I've been using the LPC55S69 processor and despite a serious effort to bit-pack my memory usage, am running out of the 256KB of general purpose RAM. I have tried to use SRAMX for array storage, but am getting some intermittent faults.
I have read on other posts that I should be able to use SRAMX, and the user manuals for other LPC variants depict/describe the SRAMX on both the data/system-bus and code-bus, but that's not the way it's depicted in the block diagram on page 8 of the LPC55S6x user manual.
Question: Is there a special register/command I need to write to use SRAMX for data? Or, areas of SRAMX I should avoid using (even if I don't use the peripherals that would access those areas of SRAMX)?
As a contrived example, I would like to be able to execute code like the following:
uint8_t* array = (uint8_t*) (0x14000000);
array[0] = 128;
array[1] = 129;
array[2] = array[0]+array[1];
printf("value: %u", array[2]);
However, I have found that when I use SRAMX (in a similar way to how it is used in the example), I CAN read/write the array values, but I seem to be getting other intermittent bus and invalid state faults. I am NOT using SRAMX for any other peripheral (neither CASPER nor saving power down RAM state). I am running FreeRTOS with several interrupts and DMA.
Any insights would be helpful, thank you!
Hi,
I copy the memory allocation of LPC55S69, pls use Non-secure address instead of secure address.
In detail, pls modify the first line to uint8_t* array = (uint8_t*) (0x04000000);
I am sure that the SRAMX can be used to save data and save/run code.
uint8_t* array = (uint8_t*) (0x04000000);
array[0] = 128;
array[1] = 129;
array[2] = array[0]+array[1];
printf("value: %u", array[2]);
Hope it can help you
BR
XiangJun Rong