This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC1225 CORTEX M0 simulation in MDK4.23

I am newly trying out NXP LPC1225. I have downloaded MDK4.23. Examples meant to be used with Keil boards for processors LPC11XX are working fine. But when target is chosen as LPC1225, the simulator does not seem to work. Writing into GPIO OUT register updates the pin status, but GPIO SET and GPIO CLR registers do not seem to work. Similarly, UART0, UART1 LSR never reflects the status of RBR,THR.

Are there any known problems with this processor simulation? Has anyone used LPC1225?
Is there a working example available for this processor?
Following is the extract from the code I am trying out: I used CMSIS examples,but they did not work. SO I wrote my own code. All register addresses are defined in a .h file


#define writereg writemem
#define readreg readmem


void writemem(uint32_t dwAddress,uint32_t dwValue)
{
volatile uint32_t *ptr;
ptr=(uint32_t *)dwAddress;
*ptr=dwValue;
}


uint32_t readmem(uint32_t dwAddress)
{
volatile uint32_t *ptr;
volatile uint32_t dw1;

ptr=(uint32_t *)dwAddress;
dw1=*ptr;
return(dw1);
}


int main(void)
{
    /* Temp. data*/
    volatile uint32_t idx, len;
    voalatile int32_t exit_flag, addr_toggle;

        int32_t i,j;

        SystemInit(); // Initialises CLK for IRC OScillator
        UART0Init(); // Initialises for UART baudate 9600,n,8,1
        UART1Init();
        GPIOInit();  // Initialises GPIO0 to be all outputs ( Except for RXD0,RXD1 pins)
        j=1;

        while(1){
                j=j*2;
                writereg(GPIO0SET,j); // this does not work. But changing GPIOSET to GPIOOUT ,
                                       //works
                UART0PutChar(0x42);  //LSR never shows THR is empty. So character output does
                                     //not take place. If check for LSR is bypassed and data
                                     //is written to THR, it does not appear on UART0 window
                for (i=0;i<100;i++){
                        UART0PutChar(0x41);
                }
                writereg(GPIO0CLR,j);
                UART1PutChar(0x42);
                for (i=0;i<100;i++){
                        UART1PutChar(0x41);
                }
        }


}




Thanks in advance for any info.
KG