How to set the serials clock configurations in running time using Processor Expert?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the serials clock configurations in running time using Processor Expert?

425 Views
Contributor I

I´m using KDS 3.0.0 and a S9KEAZ128AVLH MCU. I found the following methods that supposedly do this:

For  the AsynchroSerial component: SetBaudRateMode

For I2C_LDD and CAN_LDD: SetClockConfiguration

The problem is there is no way to enable this methods. For the AsynchroSerial , for exemple, it says that I should choose a specific value from the Timing dialog box, but I already did that and the problem remains.

Can you help me on that?

0 Kudos
12 Replies

3 Views
NXP Employee
NXP Employee

Hi Marico,

it seems these two components does not support runtime pin re-connection. There is method "ConnectPin" provided in both components, but cannot be turned on.

The last option is to generate code for the component, copy generated code to different location and disable component in the project. This solution is not ideal, but may help in your case.

Regards

Marek

Regards,
Marek
0 Kudos

3 Views
Contributor I

Ok, thanks Marek!

0 Kudos

3 Views
NXP TechSupport
NXP TechSupport

Hello Marcio,

When you setting the Baud rate type to "list of values",  the method  "AS1_SetBaudRateMode" will available :

 

 pastedImage_1.png

 

 

Hope it helps!

 


Have a great day,
TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

 

0 Kudos

3 Views
Contributor I

Hi, I did that but the method  "AS1_SetBaudRateMode" still keeps unavailable. What else did you do?

and what about the others serials communications, like CAN_LDD and I2C_LDD? how can I make the SetClockConfiguration Method available?

BAUD1.jpgBAUD2.jpg

0 Kudos

3 Views
NXP TechSupport
NXP TechSupport

Hello Marcio,

- It has available on your screenshot :

pastedImage_1.png

- About CAN_LDD and I2C_LDD,  it seems no matter how, the SetClockConfiguration Method unavailable .

BR

Alice

0 Kudos

3 Views
Contributor I

Hi Alice, yes, it´s available and I sent the reply before I check this, sorry.

About CAN_LDD and I2C_LDD there is no way to change it´s clock in running time?

And going further: it is either possible to switch a pin configuration using processor expert? Like to inicialize as a GPIO and then set it as an ADC input in running time?

0 Kudos

3 Views
NXP Employee
NXP Employee

Hi Mario,

LDD components support dynamic pin configuration, but it is little bit tricky to configure it. It is intended for advanced users.

Here is example for CAN_LDD component:

  • first ensure, "Auto initialization" property in LDD component is turned off, because conflicting routing cannot be applied in auto initialization (after reset)
  • the select pin, that is already used. Such pin shows a routing error.
  • Go to inspector drop down menu and select "Ignore Non-Critical Errors"
    Capture.PNG
  • Routing error is changed to warning
  • In your application code, call method "Init" to change routing to LDD component

Hope that helps.

Regards

Marek

Regards,
Marek
0 Kudos

3 Views
Contributor I

Hi Marek,

I choosed PTA0 for ADC_LDD component (ADC0_SE0) and Init_KBI (KBI0). It worked for the ADC, but for the Init_KBI component it seems to be unavailable the "Ignore Constraints and Non-Critical Errors".  I have attached the print screens,

please take a look:

ADC.jpg

KBI.jpg

0 Kudos

3 Views
NXP Employee
NXP Employee

Hi Marcio,

it seems dynamic pin configuration is supported for LDD components only.

Init method of the KBI component does not contain initialization of the pin(s), this initialization is shared in after-reset code, see void Common_Init(void)

Init_KBI.c module is static, it is not generated, but copied into project if not there. You can modify this module manually (add pin routing) and your changes should be preserved.

Marek

Regards,
Marek
0 Kudos

3 Views
Contributor I

Hi Marek,

Ok, thanks.

I have one last issue: i tryed to share I2C_LDD with SPIMaster_LDD, followed the steps you mentioned but still having the conflicts error. I have attached some print screens for you to check the problem.

Regards,

Marcio.

IMG1.jpg

IMG3.jpg

IMG2.jpg

IMG4.jpg

0 Kudos

3 Views
NXP TechSupport
NXP TechSupport

Hello Marcio,

 This chip doesn't support pin reconnect when in runtime.

About CAN_LDD and I2C_LDD, there isn't PE function to change the clock in running time.

BR

Alice

0 Kudos

3 Views
NXP Employee
NXP Employee

Hi Marcio,

you need to select "list of values" and specify at least two values in the list below.

The method allows to switch between specified modes.

Hope this helps

Marek

Regards,
Marek
0 Kudos