2018-05-07 09:26 AM
Hi,
Is there any doc mention about STM32L4 (STM32L4996 and STM32L4A6) ISR source? The doc I found from both ST and ARM reference manual do seems list all of the ISR source.
Thanks,
****
Note: this post was migrated and contained many threaded conversations, some content may be missing.Solved! Go to Solution.
2018-05-07 09:32 AM
Hard to decipher
See pg 396 of RM0351 Rev 6, Table 57 'Vector Table'
The 'position' field indicates the ISR managed by the NVIC
2018-05-07 09:32 AM
Hard to decipher
See pg 396 of RM0351 Rev 6, Table 57 'Vector Table'
The 'position' field indicates the ISR managed by the NVIC
2018-05-07 11:49 AM
Hi Clive,
Got it. Thanks.
Is there any .h file already define all of those ISR number?
Thanks,
Dick
On Mon, May 7, 2018 at 9:34 AM, Clive One <st-microelectronics@jiveon.com>
2018-05-07 11:53 AM
STM32Cube_FW_L4_V1.11.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include\stm32l4a6xx.h
Via
STM32Cube_FW_L4_V1.11.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include\stm32l4xx.h
and define STM32L4A6xx on compiler command line
2018-05-07 12:00 PM
Got it. Thx
On Mon, May 7, 2018 at 9:55 AM, Clive One <st-microelectronics@jiveon.com>
2018-05-07 12:40 PM
Hi,
Is there any example code to manipulate ISR such as trigger, set pripority,
on/off...etc?
Thanks,
Dick
2018-05-07 04:07 PM
Open the project in the IDE (Keil or whatever you have). Build the project.
Then right click on the identifier and select 'go to definition'.
The demo projects should build without any errors. Unless you open the project in a wrong IDE or there's some problem with installation of the IDE.
-- pa
2018-05-07 04:23 PM
Might I suggest you review Joseph Yiu's Essential Cortex-M3/M4 book and chapters related to NVIC. Settings for Group Priority, and Preemption being of particular importance.
Please review also the assorted HAL examples provided under the repository trees. Use a 'File Manager' to search and view file content.
STM32Cube_FW_L4_V1.11.0\Projects\NUCLEO-L496ZG\Examples\GPIO\GPIO_EXTI\Src\main.c
STM32Cube_FW_L4_V1.11.0\Drivers\STM32L4xx_HAL_Driver\Inc\stm32l4xx_hal_cortex.h
/** @defgroup CORTEX_Exported_Functions_Group1 Initialization and Configuration functions
* @brief Initialization and Configuration functions * @{ *//* Initialization and Configuration functions *****************************/void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup);void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority);void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);void HAL_NVIC_SystemReset(void);uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);/**
* @} *//** @defgroup CORTEX_Exported_Functions_Group2 Peripheral Control functions
* @brief Cortex control functions * @{ *//* Peripheral Control functions ***********************************************/uint32_t HAL_NVIC_GetPriorityGrouping(void);void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn);void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);void HAL_SYSTICK_IRQHandler(void);void HAL_SYSTICK_Callback(void);2018-05-07 04:46 PM
Yes, I am reading the HAL user's manual. I saw those functions you
mentioned in the email.
One more question - is there any functions to set/get M4 register value?
Thanks,
Dick
On Mon, May 7, 2018 at 2:23 PM, Clive One <st-microelectronics@jiveon.com>
2018-05-07 04:53 PM
Which registers specifically?
Many peripheral and NVIC registers are mapped into memory so are accessible using normal read/write variables, or pointers.
The processor registers (ie R0..R15) would be better accessed via assembler code or inlined as they are nominally used for parameter passing to/from C functions and to hold intermediate values in computations.