Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Problems occurring
At the time of data transfer, sometimes first data is continuously transmitted.
For example
- Data make
for(u=0; u<64; u++)
sciSend(sciREG,64,x[u]);
---------------------------------------
- Data Transmit(Main while loop)
sciSend(sciREG,1,x[i]);
i++
if( i ==64)
{
i=0;
}
---------------------------------------
When sending 64 bytes, after sending the intended data, the data at address 0 is sometimes copied to the next 8 addresses.
It is confirmed that this phenomenon occurs periodically.
-------------------------------------------------------------------------------------------------------------------
The cause of the problem I grasped is SCI TX Interrupt Set.
Halcogen : VIM SCI Level 0 Interrupt set , SCI Interrupt enable and High Level set
scisendbyte() => TX Interrupt running and Interrupt clear => Wait scisendbyte()
-------------------------------------------------------------------------------------------------------------------
sci TX Interrupt set is added inside the used scisendbyte() function.
This is because an interrupt does not occur when used as a provided function.(spnu515 See section 30.3.1)
USER CODE BEGIN : sci->SETINT = (uint32)SCI_TX_INT;
It is running without any problem with TX interrupt disabled.
I want to know if the usage is correct.
*Only SCI communication is available. It cannot be changed to LIN2.*