- This topic has 0 replies, 1 voice, and was last updated 7 years, 2 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › New CubeMX and Your Excellent Book
Tagged: CubeMX, interrupts, L4
Hi, Carmine.
I think that your book needs to be a bit more clear on how CubeMX handles interrupts. For example, for an interrupt at pin PB7 on an ‘L443CCUx (more on it below), the newest CubeMX generates the following code in the *it.c file:
/**
* @brief This function handles EXTI line[9:5] interrupts.
*/
{
/* USER CODE BEGIN EXTI9_5_IRQn 0 */
/* USER CODE END EXTI9_5_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_7);
/* USER CODE BEGIN EXTI9_5_IRQn 1 */
/* USER CODE END EXTI9_5_IRQn 1 */
}
As you can see, it generated templates for TWO user code sections (‘void EXTI9_5_IRQHandler(void)’ and ‘HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_7)’). In your book, it is not clear what each section of the template code is supposed to do. UARTs and SPI each have similar code structure, with two sections where the user may add his own code.
It seems to me that CubeMX has been changing rapidly with little documentation,to the point that many videos on the internet, even less than a year old, are useless. Somewhere in this blog on in one of your tweets, you stated that CubeMX’s handling of the L4 family had problems with the file structure. I, too experienced that, but as of a week ago I can confirm that this problem no longer exists. I use the ‘L4 above with CubeMX and the AC6 eclipse-based tool without any problem with the file structure (the board is of my own design for a project).
Keep up the good work!
PS. This is my first posting here. I hope it comes out OK.