Good Day!
I just want to report an error in code generation by the Pins tool
MCUXpresso 11.3 with SDK 2.9.1 on the LPC55S69
I am using the LPC55S69 for reading values from an EC11 rotary encoder.
I have a problem with code generated by the pins tool of the internal configtools of MCUXpresso
See my attached code as well
In the PINS tool : I attach one of the encoder pins to Port P01_26 and route it as follows:
Label : "Rotary_A_Encoder"
1. PINT0 for capturing the rising edge : Identifier "Encoder_A_Rising"
2. PINT1 for capturing the falling edge : Identifier "Encoder_A_Falling"
3. GPIO for reading the level : Identifier "Encoder_A_Level"
I then "Update code" but when I then compile there is a COMPILE error in pin_mux.c as the GPIO_PinInit is called with parameters that are wrongly named:
GPIO_PinInit(BOARD_INITPINS_Encoder_A_Rising_GPIO, BOARD_INITPINS_Encoder_A_Rising_PORT, BOARD_INITPINS_Encoder_A_Rising_PIN, &Encoder_A_Rising_config);
Encoder_A_Rising should be Encoder_A_Level!
The code updater uses the Identifiers assigned to the PINT functionality, and discards the Identifiers defined for the GPIO functionality.
The quick workaround is to rename the Label in pin_mux.c:
From : BOARD_INITPINS_Encoder_A_Rising_GPIO *
To : BOARD_INITPINS_Encoder_A_Level_GPIO *
Using the GPIO functionality in your code works with the correct identifiers though!
GPIO_PinRead(GPIO, BOARD_INITPINS_Encoder_A_Level_PORT, BOARD_INITPINS_Encoder_A_Level_PIN)
Attached my code that compiles, but if you open my project and go and modify something in the PINS tool, and "Update code" the project will not compile
Kind regards
Gert van Biljon
Solved! Go to Solution.
Hello Gert,
thank you for reporting the issue! I have to confirm there is a bug in generation of GPIO identifiers when there is combination of GPIO and PINT signals configured in particular order. We are looking into it and will provide you fix once available. Meanwhile, you can avoid the error if you move the GPIO signals above PINT signals in the Routing Details view:
Regards,
Lukas
Hello Gert,
thank you for reporting the issue! I have to confirm there is a bug in generation of GPIO identifiers when there is combination of GPIO and PINT signals configured in particular order. We are looking into it and will provide you fix once available. Meanwhile, you can avoid the error if you move the GPIO signals above PINT signals in the Routing Details view:
Regards,
Lukas