S32 and RTD4 generate invalid pin configuration

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

S32 and RTD4 generate invalid pin configuration

666 Views
nehalp
Contributor III

I'm seeing an issue where adding LPSPI1 as (SPI Master) to my S32K344 project results in the MISO input not properly configured for input.

The generated code in the pin config shows inputBuffer as PORT_INPUT_BUFFER_NOT_AVAILABLE, which means the IMCR does not get set to the correct value during Siul2_Ip_PortInit()

 

    {
        .base                        = IP_SIUL2,
        .pinPortIdx                  = 29u,
        .mux                         = PORT_MUX_AS_GPIO,
        .safeMode                    = PORT_SAFE_MODE_NOT_AVAILABLE,
        .inputFilter                 = PORT_INPUT_FILTER_NOT_AVAILABLE,
        .pullConfig                  = PORT_INTERNAL_PULL_NOT_ENABLED,
        .pullKeep                    = PORT_PULL_KEEP_NOT_AVAILABLE,
        .invert                      = PORT_INVERT_NOT_AVAILABLE,
        .inputBuffer                 = PORT_INPUT_BUFFER_NOT_AVAILABLE,
        .outputBuffer                = PORT_OUTPUT_BUFFER_NOT_AVAILABLE,
        .adcInterleaves              = { MUX_MODE_NOT_AVAILABLE, MUX_MODE_NOT_AVAILABLE },
        .inputMuxReg                 = {
                                         239u
                                       },
        .inputMux                    = { 
                                         PORT_INPUT_MUX_ALT4,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT
                                       },
        .initValue                   = 2u
    },

 

There are no warnings or errors generated, but I only see any input of 0x00 on the LPSPI Rx FIFO. 
If I manually change .inputBuffer = PORT_INPUT_ENABLED then I am able to see input data on the Rx FIFO.

 

Is there some conflict I'm unaware of that is preventing .inputBuffer from getting set to the correct value?

I've tried to remove the LPSPI pin configuration and re-add it, but it does not change these values.

Tags (4)
0 Kudos
Reply
3 Replies

571 Views
nehalp
Contributor III

The option is available, but has no effect. I've tried forcing it to enabled, but it would not change the .inputBuffer field in the generated code. I suspect the issue is due to having a couple other pins configured for multiple functions (e.g. as an interrupt and eMIOS ICU). When I made each pin in the configured for a single function, input buffer was properly enabled (though other pins elsewhere in the configuration still showed INPUT_BUFFER_NOT_AVAILABLE)

0 Kudos
Reply

556 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @nehalp,

Even when configuring multiple pins, I can see the input buffer parameter initialization. Could you share your pin configuration? If this issue keeps happening, the simplest workaround is to declare the "PORT_INPUT_BUFFER_ENABLED" parameter to the pin configuration after updating the code.

Julin_AragnM_0-1712781128367.png

Julin_AragnM_1-1712781185109.png

Best regards,
Julián

 

0 Kudos
Reply

629 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @nehalp,

When enabling pin PTA29, is the option for "Input Buffer Enable" enabled? When I add the pin with the following configuration, I can see PORT_INPUT_BUFFER_ENABLED is correctly set:

Julin_AragnM_0-1712346182434.png

   {
        .base                        = IP_SIUL2,
        .pinPortIdx                  = 29u,
        .mux                         = PORT_MUX_AS_GPIO,
        .safeMode                    = PORT_SAFE_MODE_DISABLED,
        .inputFilter                 = PORT_INPUT_FILTER_NOT_AVAILABLE,
        .pullConfig                  = PORT_INTERNAL_PULL_NOT_ENABLED,
        .pullKeep                    = PORT_PULL_KEEP_DISABLED,
        .invert                      = PORT_INVERT_DISABLED,
        .inputBuffer                 = PORT_INPUT_BUFFER_ENABLED,
        .outputBuffer                = PORT_OUTPUT_BUFFER_DISABLED,
        .adcInterleaves              = { MUX_MODE_NOT_AVAILABLE, MUX_MODE_NOT_AVAILABLE },
        .inputMuxReg                 = {
                                         239u
                                       },
        .inputMux                    = { 
                                         PORT_INPUT_MUX_ALT4,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT,
                                         PORT_INPUT_MUX_NO_INIT
                                       },
        .initValue                   = 2u
    },
};

 

Best regards,
Julián

0 Kudos
Reply