Why do you need the define FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ? Where can I find documentation about it?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why do you need the define FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ? Where can I find documentation about it?

Jump to solution
709 Views
mitterha
Senior Contributor I

Hello,

the flexspi_nor_polling_transfer example sets the define FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ to 0 in IAR project options.

For what do you need this define? Where can I find documentation about it?

Kind regards,

Stefan

0 Kudos
1 Solution
630 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Stefan,

 

This define is not needed, is optional. If you like to do the same with other drivers just be aware of the following:

The limitation of the double weak mechanism is that it cannot be used for peripherals that share the same vector entry. For this use case, redefine the first layer weak function to enable the desired peripheral interrupt functionality. For example, if the MCU’s UART0 and UART1 share the same vector entry, redefine the UART0_UART1_IRQHandler according to the use case requirements.

Best regards,

Felipe

View solution in original post

4 Replies
630 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Stefan,

 

That macro defines whether to use default weak IRQ implementation in drivers. For more information of what the double weak mechanism is please check the link below.

 

MCUXpresso SDK API Reference Manual: Architectural Overview 

Hope it helps!

Best regards,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored.

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

------------------------------------------------------------------------------ 

0 Kudos
630 Views
mitterha
Senior Contributor I

Hello Felipe,

thank you for your answer.

I read the architectural overview and understand the double weak behaviour. I have still another question. You can always overwrite the first level weak IRQ handler. The mentioned define FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ  is only used for the FlexSPI driver. Why is the define needed for fsl_flexspi.c and in no other driver?

Kind regards,

Stefan

0 Kudos
631 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Stefan,

 

This define is not needed, is optional. If you like to do the same with other drivers just be aware of the following:

The limitation of the double weak mechanism is that it cannot be used for peripherals that share the same vector entry. For this use case, redefine the first layer weak function to enable the desired peripheral interrupt functionality. For example, if the MCU’s UART0 and UART1 share the same vector entry, redefine the UART0_UART1_IRQHandler according to the use case requirements.

Best regards,

Felipe

630 Views
mitterha
Senior Contributor I

Thank you for your answer!

0 Kudos