How to resolve the Frame error flag?

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

How to resolve the Frame error flag?

Jump to solution
17,801 Views
s32k146_ige
Contributor IV

hi,

i am getting UART frame error, with communication settings as follows, baud rate 1mbps, databits 8, stopbits 1 and parity none, the data i received i tried to capture on terminal software and i can see data as follows

Screenshot 2023-04-26 170007.png

Screenshot 2023-04-26 165459.png

 

Following are the settings for UART driver,

/* Instance structure is used for storing PAL instance information. */
uart_instance_t lpuart1_uart_instance = {
    .instType          = UART_INST_TYPE_LPUART,
    .instIdx           = 2U
};

/* Serial User Configurations */
uart_user_config_t lpuart1_uart_Config0 = {
    .baudRate         = 1000000,
    .bitCount         = UART_8_BITS_PER_CHAR,
    .parityMode       = UART_PARITY_DISABLED,
    .stopBitCount     = UART_ONE_STOP_BIT,
    .transferType     = UART_USING_INTERRUPTS,
    .rxDMAChannel     = 0U,
    .txDMAChannel     = 0U,
    .rxCallback       = rxCallback,
    .rxCallbackParam  = NULL,
    .txCallback       = NULL,
    .txCallbackParam  = NULL,
    .extension        = NULL
};

 

the code is uart_pal_echo_s32k146, just modified to send specific command as requirement.

i dont understand UART ERROR reason, if data is received properly on terminal software.

 

0 Kudos
Reply
1 Solution
17,374 Views
s32k146_ige
Contributor IV

This was resolved after re writing the UART driver. We wrote the UART driver from base and used ISR to handle data. After that we started receiving packet frame at 1mbps data rate from Slave device.

 

View solution in original post

Tags (3)
0 Kudos
Reply
22 Replies
17,375 Views
s32k146_ige
Contributor IV

This was resolved after re writing the UART driver. We wrote the UART driver from base and used ISR to handle data. After that we started receiving packet frame at 1mbps data rate from Slave device.

 

Tags (3)
0 Kudos
Reply
16,905 Views
Senlent
NXP TechSupport
NXP TechSupport

I'm glad to hear that your problem was solved, it's also been bothering me for a long time

17,283 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

I tested it, and when the baud is lowered to 500K, it can be sent normally. I think this may have something to do with the wiring harness. When I use the USB port of the S32K146 to communicate, it can reach 1M stably.

0 Kudos
Reply
17,272 Views
s32k146_ige
Contributor IV

Dear @Senlent 

We checked the same hardware with ESP32 and we can see the data from slave device, we used the same wire harness. it doesnt look like wire harness issue

0 Kudos
Reply
17,261 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

I made a test demo for your reference, this demo will send the received data to PC.

hardware is S32K146EVB,Lpuart2,1M,

software is S32 DS V2.2,RTM 3.0

Senlent_0-1682608592121.png

If you still have question about this, I will reply to you utill next thursday.

0 Kudos
Reply
17,183 Views
s32k146_ige
Contributor IV

If you still have question about this, I will reply to you utill next thursday.

@Senlent Very sad to hear this, this unprofessional for us. our team has been working with NXP MCU for  6 years. This current development is very important for US. We have tried following things and its not in favour of NXP MCU.

  1. our slave device works with 
    1. ESP32
    2. beaglebone
    3. TI MCU
  2. we tried esp32 @ 1mbps with s32k146 
    1. even with esp32 @ 1mbps we are getting same error ( frame error)

At present except from s32k146 everything is working, we tried our custom hardware with s32k146 (64 pin) even that is causing frame error. 

So apart from NXP SDK or MCU with dont anything to doubt about error. If any local FAE can get in touch that will be helpful. i will raise this with our higher admin to get in contact with FAE 

 

0 Kudos
Reply
17,162 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

Can you test the demo I sent you? 
The picture below is the result of my test

Senlent_0-1682821914954.png

this demo works fine here.

If this answer still doesn't solve your problem, then I really don't know how to help you.
You can create a new case here and other engineers will help you

https://support.nxp.com/s/ 

BR!

 

0 Kudos
Reply
17,148 Views
s32k146_ige
Contributor IV

I am also sharing you the processor expert file, if you can validate it that would be much appreciated

 

0 Kudos
Reply
17,134 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

Have you tested the demo I sent you? Can it work?
Your configuration uses a 40Mhz external clock, you can try to use FIRC clock. (We are not using hardware that uses a 40Mhz external crystall )

Also you can refer to lpuart_echo_s32k146.

I've tried everything I could and it's working fine on my side. So if it doesn't help you yet, I hope you create a new case

https://support.nxp.com/s/ 

0 Kudos
Reply
17,141 Views
s32k146_ige
Contributor IV

What is your

  • SDK version 
  • IDE version
  • software that are you using to receive data
  • USB TTL model

Kindly share link incase we have to download it.

we have following ;

S32 Design Studio for ARM

Version: 2018.R1
Build id: 180815

SDK is 2.9 and 3.0

 

0 Kudos
Reply
17,155 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

We are on a national holiday which ends on 5.3.

You said you are using S32K146(64PIN), this is a very important new information, because in the code you sent me the default is S32K146(100PIN).

If this is the case, the communication must fail, because there are many places in your project that still need to be modified.

1.you need to change your project to s32k146_64 

Senlent_1-1682814629129.png

2.Pin configuration for S32K146(64) Lpuart2.

If you are using LPUART2, then the port configuration of your LPUART2 is wrong

The port configuration of the Lpuart2 module of S32K146 (64PIN) is as follows

Senlent_2-1682814762981.png

0 Kudos
Reply
17,151 Views
s32k146_ige
Contributor IV

the pin configuration is not an issue, we have been doing this for years. on 64 pin MCU we are using uart1 and c8 and c9 IO pins, we are very much familiar with chipset. this is what i am trying to tell you from day1 that configuration is not an issue. because we get Tx out and we see Rx on scope. 

if you want i can share specific file that can tell you about MCU config (IO and peripherals)

 

0 Kudos
Reply
17,270 Views
s32k146_ige
Contributor IV

Same wire harness works with USB TTL

0 Kudos
Reply
17,303 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

This demo is made based on S32K146EVB hardware, the default is to use LPUART1,
If you modify to LPUART2 and still use S32K146EVB, you need additional TTL-USB tools and modify the port of LPUART2 correctly

Senlent_1-1682574701948.png

Senlent_2-1682575112434.png

 

 

0 Kudos
Reply
17,300 Views
s32k146_ige
Contributor IV

This has been done, this is not an ISSUE, if this is issue than transmit wont happen

0 Kudos
Reply
17,297 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

 can you share your demo code?

0 Kudos
Reply
17,294 Views
s32k146_ige
Contributor IV

Can you share a email address, i cannot put in open

0 Kudos
Reply
17,288 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

You can send me a private message directly.

0 Kudos
Reply
17,286 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

I tested your project on S32K146EVB, when I send each byte of "hello!" one by one, I can get the response of "hello world!", so this communication is no problem, the question is what is the application you want to achieve.

 

0 Kudos
Reply
17,282 Views
s32k146_ige
Contributor IV

I am trying to send CMD to slave devices

slave devices Config is 1mbps-8-n-1, I tried sending data from terminal software to MCU, i can see RX and TX.

But Received byte from slave device is not reflected on UART buffer, i check data from RX and TX line on CRO/DSO and i can see wave form on both line.

I also tried connecting Terminal software to slave device, it is showing data from slave devices as i have shown in image.

I contacted the slave devices vendor but according to them issue has to be at MCU end, i also detect issue at MCU end, but i couldnt understand the error.

if terminal software works on both end(MCU and slave devices), but MCU and slave device connect together, MCU send an FRAME ERROR, no data in buffer.

i hope you have understood my problem, please let me know if i need to clarify further anything

0 Kudos
Reply