How to resolve the Frame error flag?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to resolve the Frame error flag?

ソリューションへジャンプ
17,819件の閲覧回数
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 件の賞賛
返信
1 解決策
17,392件の閲覧回数
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.

 

元の投稿で解決策を見る

タグ(3)
0 件の賞賛
返信
22 返答(返信)
17,393件の閲覧回数
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.

 

タグ(3)
0 件の賞賛
返信
16,923件の閲覧回数
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,301件の閲覧回数
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 件の賞賛
返信
17,290件の閲覧回数
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 件の賞賛
返信
17,279件の閲覧回数
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 件の賞賛
返信
17,201件の閲覧回数
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 件の賞賛
返信
17,180件の閲覧回数
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 件の賞賛
返信
17,166件の閲覧回数
s32k146_ige
Contributor IV

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

 

0 件の賞賛
返信
17,152件の閲覧回数
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 件の賞賛
返信
17,159件の閲覧回数
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 件の賞賛
返信
17,173件の閲覧回数
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 件の賞賛
返信
17,169件の閲覧回数
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 件の賞賛
返信
17,288件の閲覧回数
s32k146_ige
Contributor IV

Same wire harness works with USB TTL

0 件の賞賛
返信
17,321件の閲覧回数
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 件の賞賛
返信
17,318件の閲覧回数
s32k146_ige
Contributor IV

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

0 件の賞賛
返信
17,315件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

 can you share your demo code?

0 件の賞賛
返信
17,312件の閲覧回数
s32k146_ige
Contributor IV

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

0 件の賞賛
返信
17,306件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@s32k146_ige

You can send me a private message directly.

0 件の賞賛
返信
17,304件の閲覧回数
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 件の賞賛
返信
17,300件の閲覧回数
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 件の賞賛
返信