SS32K344 LPUART Timeout counter

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

SS32K344 LPUART Timeout counter

Jump to solution
595 Views
xianalbela
Contributor II

Hello all,

I am trying to implement the Timeout counter from the LPUART module of an S32K344 microcontroller, but I have encountered some issues.

I want to use them to monitor idle bits elapsed from the last received message so, my first question is, do they have the ability of generating a hardware interrupt?

Looking at the table of LPUART registers as per the S32K3XX Reference Manual (section 77.6.1), the registers that I should modify to configure the timeout counters are TOCR, TOSR and TIMEOUTN.

Captura de pantalla 2025-03-05 181026.png

The first thing that I noticed is that these registers are not in the LPUART register layout typedef in the SDK (in the S32K344_LPUART.h) 

 

Captura de pantalla 2025-03-05 180917.jpg

Therefore, I have tried to access these registers manually, taking the IP_LPUART_0_BASE address from the SDK and adding the corresponding offset (0x58 in this case). When trying to read/write this region, I get a Hard Fault. I have tried to read other LPUART registers from the ones in the image above with this method to ensure that the method itself is not the problem, and it worked just fine.

Right now I am supposing that this memory region is somehow protected, but I could not find many info on this in the Reference Manual, so my question is: Is this the case? Is this memory region protected? and, if so, is there any way that I can access it to configure the timeout counters?

Thank you in advance!

 

 

Tags (2)
0 Kudos
Reply
1 Solution
430 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@xianalbela

I have double checked it , this register is not support in S32K344,S32k324,S32K314 and S32K312.

For other S32K3's mcu, it does support.

View solution in original post

0 Kudos
Reply
9 Replies
575 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@xianalbela

Please provided your demo code so that i can reproduce your problem, it will be more easy for me to help you found the root cause.

0 Kudos
Reply
557 Views
xianalbela
Contributor II

Hello @Senlent,

I am using the LpuartFlexio_Uart_Ip_Example_S32K344 from the NXP repository.

The only changes that I have made are in the main.c file (that I am attaching to this reply) to implement the timeout counter (changing the LPUART instance from 3 to 0) and to remove the Flexio UART instance.

Thank you!

Tags (2)
0 Kudos
Reply
542 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@xianalbela

Could you please double check it, cause i didn't see any attachments.

0 Kudos
Reply
532 Views
xianalbela
Contributor II

Sorry @Senlent ,

I am re-attaching the file. 

0 Kudos
Reply
526 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@xianalbela

You also need to tell me the RTD version you're using.

It would be best if you can provide me with the complete project you tested

0 Kudos
Reply
519 Views
xianalbela
Contributor II

Hello @Senlent ,

sure, I am attaching the complete project.

I am using the S32DS for ARM Version 3.4, and the RTS version that I am using is the 2.0.0 for the S32K3xx.

0 Kudos
Reply
462 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@xianalbela

I checked your code and there is nothing wrong with your syntax.

However, the register address you used is not defined.

The registers that users can use and access are only in "S32K344_LPUART.h".

0 Kudos
Reply
433 Views
xianalbela
Contributor II

Hello @Senlent,

yes, I am aware that this register is not defined in the "S32K344_LPUART.h" file, but I wanted to know if there is any other way to use the LPUART Timeout counter feature since it is described in the reference manual.

Maybe there is some mode that needs to be activated before trying to access those registers.

Is it possible to use this feature in any way?

Best regards.

0 Kudos
Reply
431 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@xianalbela

I have double checked it , this register is not support in S32K344,S32k324,S32K314 and S32K312.

For other S32K3's mcu, it does support.

0 Kudos
Reply