Failure with Serial_LDD:LoopMode

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

Failure with Serial_LDD:LoopMode

Jump to solution
1,600 Views
neilhancock
Contributor IV

For a Cpu:MKL26Z128VFT4 part, I'm looking to use UART0 as HalfDuplex RS485.

In the registers I think this means setting

Uart0_S2: set LOOPS=RSRC=1

and then managing the single pin with

Uart0_C3:TXDIR 1 Tx Output else 0 Rx Input

I'm using KDS300 so in PEgenerate code for LoopMode - but now I get

 

DescriptionResourcePathLocationType
Generator: FAILURE: at line 1769: Error in including "Drivers\Common\AsynchroMasterLoopMode.inc" from directory C:\n\bin\Freescale\KDS_3.0.0\eclipse\ProcessorExpert\Repositories\Kinetis_Repository (file: Drivers\Kinetis\AsynchroSerial.drv)Test2AScustProcessor Expert Problem

 

So to make it work, I turn off PEgeneratr code for LoopMode - and then update the registers directly.

UART0_PDD_SetLoopMode(PeripheralBase, UART0_PDD_LOOP_MODE_RX_TO_TX_PIN)

UART0_PDD_SetTxPinDataDirection(PeripheralBase, UART0_C3_TXDIR_MASK)

I can't see how to disable the assignment of the UART0:Rx to a hardware pin.

Is there a more defined way of doing it. Thanks

Labels (1)
1 Solution
1,265 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Neil,

I just get the hot fix for this issue from development team , please see the attachment.

Hope it helps


Have a great day,

Alice

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

View solution in original post

11 Replies
1,265 Views
neilhancock
Contributor IV

Ok - thanks.

Sounds like you have confirmed which layer the bug is.

Since AsyncrhroSerial - where the error is - uses the Serial_LDD, which can set the LoopMode.

So really this is a bug report.

Regards

0 Kudos
Reply
1,265 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello

I need confirm with the PE team whether this is a bug.

And about the component of "Serial_LDD" , you can configure the loop mode here :

pastedImage_0.png

Hope it helps


Have a great day

Alice

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

0 Kudos
Reply
1,265 Views
neilhancock
Contributor IV

Hello Alice, I can see that the Serial_LDD as a standalone component can have its Loop_Mode set.

When its used by the AsycnhroSerial it doesn't seem that it can be overridden.

I would expect the AsynchroSerial to be able to make adjustments to it since it owns it.

pastedImage_0.png

0 Kudos
Reply
1,266 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Neil,

I just get the hot fix for this issue from development team , please see the attachment.

Hope it helps


Have a great day,

Alice

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

1,265 Views
neilhancock
Contributor IV

Thanks Alice.

I'm not sure what to do with the hot_fix - will it be in the next release/update of PE?

I've just done an update which includes

PE for Kinetis 3.0.1.b150806

doesn't mention it.

Its not that important to me as I have a work around, good to know it has been updated though as its a nice hardware feature.

0 Kudos
Reply
1,265 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Neil,

When use the component "AsycnhroSerial" , it is normal  about  the configuration "Serial_LDD" is gray.

The error is when configure the methods Loopmode to generate code , and i will create a SR for you , then report it to the PE team,

I will tell you .ASAP after i get reply .

Hope it helps

Alice

0 Kudos
Reply
1,265 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Neil,

(1) In KDS, after you configure the PE with no errors , it should be no error when generate code .

So you can screenshot your PE configure view or send me your project , i will  test it on my side .

(2) If you want  the UART component do not generate code , or you want change the code , you can choose "Don't write generated component modules",

then you can change the code by hand.

pastedImage_0.png


Have a great day,
Alice

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

0 Kudos
Reply
1,265 Views
neilhancock
Contributor IV

Hello Alice

Thankyou. Not sure that I've asked this correctly - so will repost the question.

However yes - when I disable LoopMode it generates code correctly.

0 Kudos
Reply
1,265 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Neil,

Do you mean here :

pastedImage_0.png

if not , could your please screenshot yours , thank !

BR

Alice

0 Kudos
Reply
1,265 Views
neilhancock
Contributor IV

Hello Alice

When I set  the Serial_LDD methods Loopmode to generate code - it causes an error.

My KDS300 picture looks different than yours as below

pastedImage_0.png

I have it fixed so it doesn't do it - but reporting what looks like a bug, as I wouldn't expect any condition I can set in the UI to result in a failed PE Code Generation

0 Kudos
Reply
1,265 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Neil,

Yes , when use the component of "AsynchroSerial" , there will be error when configure the methods Loopmode to generate code ,

and i will be going to confirm 

And if you use the component of "Serial_LDD" , there will be no error :

pastedImage_0.png

Thank for your remainder !

Hope it helps

Alice

0 Kudos
Reply