Hi All,
I am facing a problem with the SCI in MC9S12XDT256. I am using CodeWarrior 5.7.0 with P&E Multilink Cyclone Pro for the development. I am using iSYSTEM iC3000HS Emulator for debugging.
I want to set up one of the SCI modules (say, SCI0) as a transmitter only. I have an array with 'n' bytes (say, 20) which have to be transferred out via the SCI. I do not want to receive anything through the SCI. My data format is: 1-8-1, no parity, 9.6k baud. I think that I'm configuring the SCI correctly. But not able to handle the interrupts correctly. While initializing the SCI, I have enabled TE & rest of the pins are set to 0 in SCI0CR2.
To send out the data, I fill up the queue & enable SCI0CR2_SCTIE. This generates the SCI interrupt. I wait for TDRE to become 0. Then I load SCI0DRL with a byte. However, I disable SCI0CR2_SCTIE (i.e., SCI0CR2_SCTIE = 0) after each load, till all the bytes are transferred.
When I observe the SCI registers during single-stepping, I see TDRE to be set etc. However I see no data on SCI0DRL and also the status register SCI0SR1 does not get cleared as it should (i.e., after I load SCI0DRL after reading SCI0SR1).
I am new to interrupt handling. Please help me out.
With warm regards,
Saurav