Bug in Peripherals Functional Groups?

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

Bug in Peripherals Functional Groups?

1,175 Views
jackking
Senior Contributor I

It seems there is a bug in the Functional Groups for Peripherals that will not allow more than one group to be called in the initialization.   I modified the .mex file directly to set multiple to true, but the UI will only allow one to be active.   This is on standalone v12.1 (and in MCUXpresso IDE 11.6.1) on Mac 11.2.3

Setting multiple initialization groups for other configs (pins) seems to work fine.

Functional_group_properties.png

4 Replies

1,158 Views
Petr_H
NXP Employee
NXP Employee

Hi, 

This is not a bug. This limitation is by design. Only one functional group can contain the default initialization code, the others are intended as alternatives or to be called additionally later. 

This information is documented in the User Guide for MCUXpresso Config Tools in the Peripherals Tool section in subsection Basic Terms and Definitions.

You can freely call multiple functional group functions in your application, however, the tool can validate design-time conflicts only among components within the one marked as "default initialization".

This limitation is used for sake of validation simplicity, because if multiple functional groups would be default, the conflicts would have to be checked across all components in multiple functional groups. It's also simpler for the users to understand that the default initialization is handled within one function. 

Could you provide more details on your use-case if you would need default initialization split between multiple functional groups? 

best regards

Petr Hradsky

Config Tools Team

 

0 Kudos

1,155 Views
jackking
Senior Contributor I

This design decision is not consistent with the other Config Tools configurations.  You can have multiple groups called by initialization in the Pins configurations.

The UI for the Peripherals config also seems to indicate that the ordering of the functional groups can be changed, which is only useful if multiple groups can be called by the initialization.

Since this is meant to "generate code"  having to modify or write code after setting all of this up defeats the purpose of the tool...     I have many peripherals used in my projects, which may or may not need to be configured for any particular project.  I use the functional groups to turn on/off initialization of the individual peripherals as needed.  

I also don't see this called out in the docs.  I see one page that indicates functionality is the same across all Configs.

Notification_Center.png

 

Functional_groups.png

Notification_Center.png

1,154 Views
jackking
Senior Contributor I

I forced multiple groups to be enabled for init by modifying the XML of the .mex file directly:
Notification_Center.png

0 Kudos

1,142 Views
Petr_H
NXP Employee
NXP Employee

I'm sorry, but if you modify the file manually like you did, the peripherals tool will not work properly and the validation of conflicts would not be handled properly.

Here is the documentation section that I mentioned:

Petr_H_0-1672843252875.png

Yes, we are aware of the differences from the Pins tool. The pins tool is the only tool that supports having multiple functional groups in default init. The peripherals tool has one additional level of individual components that you can freely enable and disable them in components view. You can also control initialization order of those individual component functions within the functional group. 

For example also in the clocks tool, you need to have one default init configuration and the others are alternatives.

If you'd like to have the initialization split in multiple functions or controlled by some login in your code, you can omit calling default initialization completely and just call the functions that  you need in your application module directly. 

Wth this approach, you might also want to un-set the [B] icon  (boot init) checking in the Problems view:

Petr_H_1-1672844123877.png

If the [B] icon is unset, the cross-dependencies from other tools will be checked to be fulfilled by any functional groups, not just by "default init" one.

 

0 Kudos