Hi All
I'm trying the instaspin_foc proj_lab05a and add the scia on gpio28-29.
I remove the BOOSTXL-DRV8301, and put the code below in the proj_lab05a.c.
The gMotorVars.Flag_enableSys is always false so it will run the while loop forever.
------------------------------------------------------------------------------
while(!(gMotorVars.Flag_enableSys))
{
SCI_Status = SCI_getRxFifoStatus(halHandle->sciAHandle);
if(SCI_Status != SCI_FifoStatus_Empty)
{
ReceivedChar = SCI_getDataBlocking(halHandle->sciAHandle);
}
if(ReceivedChar != 0x00 ){
SCI_putDataBlocking(halHandle->sciAHandle, 0x05);
ReceivedChar = 0x00;
}
}
------------------------------------------------------------------------------
The first question :
I can just get the first time the sica putdataBlocking, then the program stuck in the SCI_getDataBlocking.
Is any possible this error caused by TripZone setting for the FAULTn and OCTWn?
The second question :
SCI_putDataBlocking(halHandle->sciAHandle, 0x05);
It should be 0x05, but I got the 0xFF,
here is my BaudRate setting :
SCI_setBaudRate(obj->sciAHandle, (SCI_BaudRate_e)194);
If my laptop take the 38400 BaudRate, I can get the 0x05.
If my laptop take the 9600 BaudRate, I can get 0xFF, so It's very weird.
Any one knows the answer?
Hank