Hello. I work with MPC5606B, C, CodeWarrior. matlab.
I've tried to receive UART using RX ISR.
I add this function in main.
LINFLEX_0.UARTCR.B.UART = 1; //enable UART mode
LINFLEX_0.UARTCR.B.WL1 = 1; //set 8-bit data
LINFLEX_0.UARTCR.B.RXEN = 1; //enable RX
LINFLEX_0.LINIER.B.DRIE = 1; //Data Reception Complete Interrupt Enable
and this ISR
void TEST_UART (void)
LINFLEX_0.LINSR.R = 0xF23F;
LINFLEX_0.UARTSR.B.DRF = 1; //Data Reception Completed Flag
a++; // checking for ON/OFF
each time I send TX, the a increases as my purpose, counting. It means, flag is set when the Board complete data reception.
when I tried to receive RX in main loop, I succeeded. So, There must be no problems in UART configuration.
I can't find the reason why it doesn't work.
Please help me..
I have no experience with matlab tool in this area, but in general, please check the following points:
From my point of view, there will be some problem with interrupt settings. Please check the point above and eventually, send me your project in CodeWarrior.
I have also recommendation for you, do not clear interrupt flags by bit access. Always use register access (.R not .B).