Technical information

Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 33
No. a21
Loop optimization on volatile access generates endless loop
Version Information
V3.5.1
Details
Loop optimization on volatile access generates endless loop. The second query on volatile char
CANES0 causes an endless loop.
Example:
test.c:
#define CANC0 *((volatile unsigned char *) (0x03fec121))
#define CANES0 *((volatile unsigned char *) (0x03fec125))
void main (void)
{
CANC0= 0x01; // Disable CAN activity
while ((CANES0 & 0x08)==0); // Wait for INIT bit set
CANC0= 0x00; // Enable CAN activity
while ((CANES0 & 0x08)); // Wait for INIT bit clear
}
Command Sequence
ccv850e -noobj -g -list -passsource -Oloop v030211a.c -o v030211a
Workaround
A new compiler (PATCH to 3.5.1b4), which fixes this problem, can be downloaded from the NEC
WEB page(s) at http://www.renesas.eu/updates?id=443