STM32F407ZG on a Fusion for ARM v8 development board
MikroC Pro for Arm v6.2.0
I am once again taking this Fusion for Arm v8 board out of the box and trying to use this. Every time I do, I just get frustrated and regret ever buying this and/or anything from this company. The idea was to really have a great tool to learn ARM and prototype. ME seemed like such an awesome thing. The boards are gorgeous and I love how everything is made to make development easy. UNTIL YOU PLUG IT IN AND HAVE TO WRITE ANY SORT OF YOUR OWN CODE FOR IT .
I have been able to run some of the example code files and that's all fine but I actually wanted to learn how to use this product. I box it up and wait a year to see if ME ever gets documentation right. Sadly not yet. Why don't they just give up and let us use their product with something like Cube IDE so when we search for how to make something work on google, we can follow actual examples that aren't some imposed proprietary **** like the MikroC for ARM. If you aren't going to document well, don't make it so damned hard to use elsewhere.
So what I am trying to iterate through is how use an interrupt on a GPIO like PA0 as an example. When PAO is pressed I would like to use an ISR to handle that press to change the value of a variable. This would allow me to continue on my journey to try other things and worked with the board. The Interrupt Assistant Tool is a major letdown. I assumed I would be able to follow a series of prompts to set a rising edge interrupt on a GPIO and code blocks would be generated to make that happen. Nope!!! Just a lousy ISR shell is written and you can't even make sense of whether or not you picked the correct option. Don't even try google because the code expectations within MikroC are nowhere near they STM datasheets or application notes.
Lets start with the example code
Code: Select all
SYSCFGEN_bit = 1; // Enable clock for alternate pin functions
SYSCFG_EXTICR3 = 0x00000300; // Map external interrupt on PD10
EXTI_RTSR = 0x00000000; // Set interrupt on Rising edge (none)
EXTI_FTSR = 0x00000400; // Set Interrupt on Falling edge (PD10)
EXTI_IMR |= 0x00000400; // Set mask
NVIC_IntEnable(IVT_INT_EXTI15_10); // Enable External interrupt
What if I put in
Code: Select all
EXTI_FTSR = 0x00000100;
Code: Select all
EXTI_FTSR = 0x00000400;