Dear Moses
It is strange that we test the SPI driver lib with clock 1MHz on F5528 and it works correctly.
When we test SPI driver lib with clock 1MHz on F6779, the SPI hangs up at SPI_transfer within 10sec.
But when we test SPI driver lib with clock 4MHz on F6779, the communication is better (doesn't hangs up for more than 5 minutes)
F6779 uses eUSCI but F5438 uses USCI.
I checked the spec on the attached migration guide, the major difference it bit rate.
Do you have any ideal why SPI clock makes things different?
We noted that there is a timer interrupt launched on RTOS.
Is it possible that SPI communication is too slow which is interrupted by the timer interrupt below?
Thanks for your comment.
This is the interrupt we created:
#if defined(__ICC430__)
#pragma inline=never
#endif
extern Void MAT_isrDMA(UArg);
#if defined(__ICC430__)
#pragma vector = 50 * 2
#else
#pragma vector = 50;
#endif
__interrupt Void ti_sysbios_family_msp430_Hwi50(Void)
{
UInt taskKey;
/* disable Task scheduler */
taskKey = ti_sysbios_knl_Task_disable();
/* switch stacks and then run the phase 2 function */
ti_sysbios_family_xxx_Hwi_switchAndRunFunc(&ti_sysbios_family_msp430_Hwi50_p2);
/* handle any Task re-scheduling as required */
ti_sysbios_knl_Task_restoreHwi(taskKey);
}
Void ti_sysbios_family_msp430_Hwi50_p2(Void)
{
ti_sysbios_BIOS_ThreadType prevThreadType;
UInt swiKey;
/* disable Swi scheduler */
swiKey = ti_sysbios_knl_Swi_disable();
/* set thread type to Hwi */
prevThreadType = ti_sysbios_BIOS_setThreadType(ti_sysbios_BIOS_ThreadType_Hwi);
/* run ISR function */
MAT_isrDMA(0);
/* run any posted Swis */
ti_sysbios_knl_Swi_restoreHwi(swiKey);
/* restore thread type */
ti_sysbios_BIOS_setThreadType(prevThreadType);
}
This is the timer interrupt RTOS created automatically:
#if defined(__ICC430__)
#pragma inline=never
#endif
extern Void ti_sysbios_family_msp430_Timer_periodicStub__E(UArg);
#if defined(__ICC430__)
#pragma vector = 55 * 2
#else
#pragma vector = 55;
#endif
__interrupt Void ti_sysbios_family_msp430_Hwi55(Void)
{
UInt taskKey;
/* disable Task scheduler */
taskKey = ti_sysbios_knl_Task_disable();
/* switch stacks and then run the phase 2 function */
ti_sysbios_family_xxx_Hwi_switchAndRunFunc(&ti_sysbios_family_msp430_Hwi55_p2);
/* handle any Task re-scheduling as required */
ti_sysbios_knl_Task_restoreHwi(taskKey);
}
Void ti_sysbios_family_msp430_Hwi55_p2(Void)
{
ti_sysbios_BIOS_ThreadType prevThreadType;
UInt swiKey;
/* disable Swi scheduler */
swiKey = ti_sysbios_knl_Swi_disable();
/* set thread type to Hwi */
prevThreadType = ti_sysbios_BIOS_setThreadType(ti_sysbios_BIOS_ThreadType_Hwi);
/* run ISR function */
ti_sysbios_family_msp430_Timer_periodicStub__E(0);
/* run any posted Swis */
ti_sysbios_knl_Swi_restoreHwi(swiKey);
/* restore thread type */
ti_sysbios_BIOS_setThreadType(prevThreadType);
}