cancel
Showing results for 
Search instead for 
Did you mean: 

Pin MODE for peripherals not set correctly in device tree output file produced by CubeMx

BalaGajenthan
Associate II

Pin MODE for peripherals are set incorrectly with RSVD instead of correct alternate function definition (AF13).

When building uboot it failed because pin Mode "RSVD" is incorrectly defined.

e.g code from device tree

   m4_dcmi_pins_mx: m4_dcmi_mx-0 {

        pins {

            pinmux = <STM32_PINMUX('A', 6, RSVD)>, /* DCMI_PIXCLK */

                    <STM32_PINMUX('E', 0, RSVD)>, /* DCMI_D2 */

                    <STM32_PINMUX('E', 1, RSVD)>, /* DCMI_D3 */

                    <STM32_PINMUX('F', 11, RSVD)>, /* DCMI_D12 */

                    <STM32_PINMUX('H', 8, RSVD)>, /* DCMI_HSYNC */

                    <STM32_PINMUX('H', 9, RSVD)>, /* DCMI_D0 */

                    <STM32_PINMUX('H', 10, RSVD)>, /* DCMI_D1 */

                    <STM32_PINMUX('H', 14, RSVD)>, /* DCMI_D4 */

                    <STM32_PINMUX('H', 15, RSVD)>, /* DCMI_D11 */

                    <STM32_PINMUX('I', 0, RSVD)>, /* DCMI_D13 */

                    <STM32_PINMUX('I', 1, RSVD)>, /* DCMI_D8 */

                    <STM32_PINMUX('I', 2, RSVD)>, /* DCMI_D9 */

                    <STM32_PINMUX('I', 3, RSVD)>, /* DCMI_D10 */

                    <STM32_PINMUX('I', 4, RSVD)>, /* DCMI_D5 */

                    <STM32_PINMUX('I', 5, RSVD)>, /* DCMI_VSYNC */

                    <STM32_PINMUX('I', 6, RSVD)>, /* DCMI_D6 */

                    <STM32_PINMUX('I', 7, RSVD)>; /* DCMI_D7 */

        };

    };

   m4_i2c2_pins_mx: m4_i2c2_mx-0 {

      pins {

         pinmux = <STM32_PINMUX('H', 4, RSVD)>, /* I2C2_SCL */

               <STM32_PINMUX('H', 5, RSVD)>; /* I2C2_SDA */

      };

   };

When checked in CubeMx configuration is correctly set (including GPIO mode), and also in the "pinout view" pins are set with correct Alternate function.

I am using CubeMX version 6.0.1, and working on SM32MP157cac project.

Question is why CubeMx is outputing RSVD instead of AF13 for pin mode?

1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud ZEMMELI
ST Employee

Hi @BalaGajenthan​ ,

Well, RSVD stands for "Reserved". This allows to signal to the Resource Manager (which makes the link between the world A7 and M4) that the IO is used and especially assigned to M4 (Using A7 for expl, you will get AFx instead of RSVD).

With this info the Resources Manager will be able to manage any conflict with the EXTI depending on whether or not they are used by the M4.

Best Regards,

Khouloud

View solution in original post

3 REPLIES 3
Khouloud ZEMMELI
ST Employee

Hello @BalaGajenthan​ 

Thanks for the feedback, it will be internally checked then I'll come back to you.

Best Regards,

Khouloud

Khouloud ZEMMELI
ST Employee

Hi @BalaGajenthan​ ,

Well, RSVD stands for "Reserved". This allows to signal to the Resource Manager (which makes the link between the world A7 and M4) that the IO is used and especially assigned to M4 (Using A7 for expl, you will get AFx instead of RSVD).

With this info the Resources Manager will be able to manage any conflict with the EXTI depending on whether or not they are used by the M4.

Best Regards,

Khouloud

BalaGajenthan
Associate II

Hi @Khouloud ZEMMELI​ 

Thanks for you reply.

The peripherals in question are mutally exclusive to M4 or A7.

I tried to assign it to A7 and it does produce the corrcect device tree with AFx. but I want to assign it to M4 only, in this case it should not create a device tree block for it right?