Pheetuz
Full Member level 3
Hi Folks,
I have bought myself an Olimex STM32-P107 dev board to start having a play with, I figured something easy to do would be to flash an LED, I was wrong!
I downloaded the standard peripheral library, not so that I could use the inbuilt functions but so that I had some mnemonics for accessing registers, I tried accessing some of the port registers using said mnemonics, I didn't get any syntax errors or anything like that but nothing happened, I then tried to run the debugger so that I could see what was going on inside and it seems that the memory wasn't changing, I then figured screw the library and wrote out some pointers to change the registers directly, still the same problem!
I have ensured that the MPU is disabled, but is there anything else that I am overlooking?
/Pheetuz
I have bought myself an Olimex STM32-P107 dev board to start having a play with, I figured something easy to do would be to flash an LED, I was wrong!
I downloaded the standard peripheral library, not so that I could use the inbuilt functions but so that I had some mnemonics for accessing registers, I tried accessing some of the port registers using said mnemonics, I didn't get any syntax errors or anything like that but nothing happened, I then tried to run the debugger so that I could see what was going on inside and it seems that the memory wasn't changing, I then figured screw the library and wrote out some pointers to change the registers directly, still the same problem!
I have ensured that the MPU is disabled, but is there anything else that I am overlooking?
Code:
unsigned int * GPIO_C_CRL = (unsigned int *)0x40011000;
unsigned int * MPU_CTRL = (unsigned int *)0xE000ED94;
int main(void)
{
/* Infinite loop */
while (1)
{
*GPIO_C_CRL = 0;
*MPU_CTRL = 1;
/* Set up the necessary registers to drive port C */
}
}
/Pheetuz