2023-04-08 07:32 AM
I am trying to use FMC and I am using
*(__IO uint32_t *)(0x6C000000) = data
to send the data
but it only works from main.c I had bunch libraries included in other files too.
when I try to create new c file and put there I am getting errors. Can anybody help with this ?
compiling NT35510_800x480.c...
..\Core\Src\NT35510_800x480.c(17): error: #40: expected an identifier
*(
_IO uint8_t *)(0x6C000000) = data;
..\Core\Src\NT35510_800x480.c(17): error: #79: expected a type specifier
*(
_IO uint8_t *)(0x6C000000) = data;
..\Core\Src\NT35510_800x480.c(17): error: #145: function "<error>" may not be initialized
*(
_IO uint8_t *)(0x6C000000) = data;
..\Core\Src\NT35510_800x480.c: 0 warnings, 3 errors
"SN0009 IC1 STM32L4S9ZIT6\SN0009 IC1 STM32L4S9ZIT6.axf" - 3 Error(s), 0 Warning(s).
2023-04-08 08:53 AM
Replace _IO with volatile
2023-04-08 09:40 AM
I checked all possible examples from CubeMX and __IO is used to transfer data through FMC but all their examples are in main.c file
do you mean
*(__IO uint32_t *)(0x6C000000) = data
changing to:
*(volatile uint32_t *)(0x6C000000) = data
it does not seem to be working I still get after doing it:
compiling NT35510_800x480.c...
..\Core\Src\NT35510_800x480.c(17): error: #40: expected an identifier
*(volatile uint32_t *)(0x6C000000) = data;
..\Core\Src\NT35510_800x480.c(17): error: #79: expected a type specifier
*(volatile uint32_t *)(0x6C000000) = data;
..\Core\Src\NT35510_800x480.c(17): error: #145: function "<error>" may not be initialized
*(volatile uint32_t *)(0x6C000000) = data;
..\Core\Src\NT35510_800x480.c: 0 warnings, 3 errors
2023-04-08 09:53 AM
Perhaps there's a syntax error or you're missing some include files.
Start looking at the source, starting with the first error.