How to use multiple Serial_LDD in one project sucessfully ?

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

How to use multiple Serial_LDD in one project sucessfully ?

1,039 Views
Amit_Kumar1
Senior Contributor II

Hi

I am using K60 uc with codewarrior 10.5 and PE. I am using 2 UART ports one for  sensor and others for RS-485. I am using accelerometers also on the same board using I2C @ 800hz sampling rate, my problem is when 1 UART port is being used the data being received from UART and I2C are perfect but when I add another Serial_LDD without any initialization also , the data from I2C becomes garbage and the value from both the UART is fine . one of the uart is connected to sensor with sampling rate @ 1Hz and other UART is connected to RS-485. both with baud 115200
If I use Console_IO to one UART  and use Serial_LDD for the sensor simultaneously, then the I2C values are fine but I am not able to get the desired string from console_io as the length of the string varies coming from console_io port to the uc. Please look into the matter.

regards

Amit Kumar

0 Kudos
2 Replies

614 Views
Amit_Kumar1
Senior Contributor II

Hi

I some how managed to make it work. The issue was that I was using floating point library and initially for debugging I used Console_IO PE components to check the values on PC and other serial sensor was connected through Serial_LDD so it was working fine. I was converting the float to string using SPRINTF function. When I removed console_io the floating point got disabled and only integer value got selected and after adding other Serial_LDD if I tried to enable FP_INT in the project properties, but the output was integer only so after trying all the possible ways to make it work  in the process I tried initializing Console_IO at some port which I am not using and used Serial_LDD to the other UART where I connected RS-485. Now the Code is working fine but this was not the correct way of making it work as I am using one extra component which is increasing the size of the code and is not being used. So is there any solution to this ? Below is the screenshort of one of the project where I am enabling the floating point variables.

pastedImage_0.png

614 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Amit Kumar,

Do you attempt to have K60(without FPU) to support float point operation?  if so, I think you may refer to the thread of Re: How to use simple floating point (Kinetis)?, which provides a solution for that topic.

Hope that helps,


Have a great day,
Kan

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

0 Kudos