I am new to all things Freescale. I am trying to learn by starting with the most basic project. This is to flash a LED. This is my code.
#include "MPC5633M.h"
void Delay(void){
uint16_t x;
uint16_t y;
for(x=0;x<50;x++) {
for(y=0;y<1000;y++) {
}
}
}
int main(void) {
SIU.PCR[188].R = 0x0200; /* Enable pin for LED1 (EMIOS9) as output*/
/* Loop forever */
for (;;) {
Delay();
SIU.GPDO[2].R &= 0x07000000; /* Enable LED1*/
Delay();
SIU.GPDO[2].R |= 0x08000000; /* Disable LED1*/
}
}
It does not work. Good reasion for this is the magic numbers like 0x0200, 0x07000000, 0x08000000. I have no idea what these are, or how to set them correctly.
Ray.