When I set up a simple project for the LPC1759, access to one SSP0 Serial Port register generates an access violation (Error 65) at address 0x00000020, when the LPC_SSP0->ICR register is written. All the other registers appear to function. In the following code, when I run the simulator, the LPC_SSP0->CR1 register write works correctly, writing to address 0x40088004, but the following write to LPC_SSP0->ICR, address 0x40088020, generates the access write fault to memory address 0x00000020. The write to 0x40088020 works correctly, and the simulated peripheral behaves normally. I can map address 0x00000020-0x00000023 as read/write and supress the error, but is this a bug in the Keil peripheral simulation? Here is the entire code: The project is set up as an LPC1759.
#include <lpc17xx.h> int main(void) {
//This access works normally
LPC_SSP0->CR1 = 0;
//This generates Error 65
LPC_SSP0->ICR = 0;
return 0;
} void SystemInit(void){}
Both SSP0 and SSP1 peripherals are powered up. The port works normally if this address is set to R/W, but this address is not part of the SSP0 register set. The port woks in both the simulator and when the executable is run on the chip.
Is your peripheral powered up?