cancel
Showing results for 
Search instead for 
Did you mean: 

In which STM32CubeIDE project file are the USB OTG interrupt priority values?

RhSilicon
Lead

Hi, I'm testing the priorities of the modules, and I would like to know in which file the "Device Configuration Tool Code Generator" saved the NVIC definitions.

I have a lot of code outside the delimiters, I can't use the "Device Configuration Tool Code Generator", so I need to know which file is saved, and change manually.

NVIC.png

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

A distinction must be made between

  • the configuration file IOC, which describes the current basic configuration
  • the generated programme framework, in which one places one's own code between the USER CODE BEGIN - USER CODE END markers

The IOC uses STM32CubeMX as the starting point for programme generation. The IOC is also used for later programme generation after a possible change in the configuration (further peripherals or pins to be used, etc.), whereby the own code parts between the above markers are retained (as long as the respective peripherals are not removed).

The NVIC priority is now stored in the IOC at the mentioned location for later programme generation. In the generated source code, however, the priority stored in the IOC is also inserted, e.g. in USB_HOST\Target\usbh_conf.c, depending on the USB function selected using e.g. 

HAL_NVIC_SetPriority(OTG_FS_IRQn, xxx, 0);

I hope I understood your question correctly and could help you with it?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

The NVIC definitions are stored in the IOC file, which is a text file, but you have to be very careful when modifying it so as not to destroy the structure. Since it is not intended for manual modification, there is also little documentation on the internal structure.
However, you will find the IRQ priority under NVIC.OTG_FS_IRQn.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks,

If the intention is not to be handled manually, how can I add delimiters in the code for the automatic generator to preserve my code?

RhSilicon
Lead

NVIC.OTG_FS_IRQn.png

 

This is the last place I would look, I thought this file was read only by "Device Configuration Tool Code Generator"

RhSilicon
Lead

I closed the project, removed the *.ioc file and performed project cleanup, but it compiled with no errors. So there must be another file that has this priority data.

RhSilicon
Lead

Or is it not possible to change the priority and the "Device Configuration Tool Code Generator" shows this option just for decoration?

Peter BENSCH
ST Employee

A distinction must be made between

  • the configuration file IOC, which describes the current basic configuration
  • the generated programme framework, in which one places one's own code between the USER CODE BEGIN - USER CODE END markers

The IOC uses STM32CubeMX as the starting point for programme generation. The IOC is also used for later programme generation after a possible change in the configuration (further peripherals or pins to be used, etc.), whereby the own code parts between the above markers are retained (as long as the respective peripherals are not removed).

The NVIC priority is now stored in the IOC at the mentioned location for later programme generation. In the generated source code, however, the priority stored in the IOC is also inserted, e.g. in USB_HOST\Target\usbh_conf.c, depending on the USB function selected using e.g. 

HAL_NVIC_SetPriority(OTG_FS_IRQn, xxx, 0);

I hope I understood your question correctly and could help you with it?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.