This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM46 UART/SCI RD Register read behaves weirdly

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am stepping through this HALCoGen code.

	        /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Potentially infinite loop found - Hardware Status check for execution sequence" */
            while ((sci->FLR & (uint32)SCI_RX_INT) == 0U) 
            { 
            } /* Wait */
			/*SAFETYMCUSW 45 D MR:21.1 <APPROVED> "Valid non NULL input parameters are only allowed in this driver" */
            *data = (uint8)(sci->RD & 0x000000FFU);
			/*SAFETYMCUSW 45 D MR:21.1 <APPROVED> "Valid non NULL input parameters are only allowed in this driver" */
            /*SAFETYMCUSW 567 S MR:17.1,17.4 <APPROVED> "Pointer increment needed" */
			data++;
			length--;

and I am suspended at a breakpoint on the data++; instruction.

my watch expressions show that the RD register has the correctly read value. But when it is casted to uint8 like so "(uint8)(sci->RD & 0x000000FFU)" it shows 122 or "."

Furthermore when I write this value to the "data" pointer, it does not get written as a uint8 but rather a uint32. I can see that in the memory browser, the buffer has a 32-bit 0x0000001 in it which is correct. However in the watch, it shows as if nothing has changed.

I am thoroughly confused by this.

/home/safiullah/Pictures/Screenshot from 2015-12-09 20:00:42.jpg