Thanks @Kolban, your explanation is correct and I understand that a 32-bit access means that I can only "read 4 bytes at a time".
My problem is "operative": how to do that?
Just to let it simple: If I have a char array
How can I write/access it?
-Should I take care to pad it (in practice declare the variable as multiple of 4)?
-Should I declare it as an array of uint32_t (waste of memory)?
In practice, is there an example to understand how to manage this case? I have searched on all esp-idf components folder and the only use of IRAM_ATTR with static variable is here:
Code: Select all
\esp\esp-idf\components\driver\test\test_spi_master.c
IRAM_ATTR static uint32_t data_iram[320];
but it doesn't help so much. Also google didn't give any result.
Can someone provide an example of use a static variable placed in IRAM segment?