Forum Discussion
Altera_Forum
Honored Contributor
20 years agoIOWR and direct adress access
I can use IOWR,IORD and direct address access to operate SDRAM, But i can not use address to access Uart, for example: 1. use address alt_u8 * UartTxAdr; UartTxAdr = UART0_BASE+1; ...
Altera_Forum
Honored Contributor
20 years agoAny "I/O variables" should be qualified as volatile
so : volatile alt_u8 * UartTxAdr This prevents the optimiser from tuning the code out (because it will detect that nothing is "reading" the location).