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
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.
Solved! Go to Solution.
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.
I'm glad to hear that your problem was solved, it's also been bothering me for a long time
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.
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
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
If you still have question about this, I will reply to you utill next thursday.
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.
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
Can you test the demo I sent you?
The picture below is the result of my test
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
BR!
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
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
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
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)
Same wire harness works with USB TTL
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
This has been done, this is not an ISSUE, if this is issue than transmit wont happen
can you share your demo code?
Can you share a email address, i cannot put in open
You can send me a private message directly.
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.
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