2495 views|22 replies

29

Posts

0

Resources
The OP
 

AC7801 chip serial port printing problem [Copy link]

 
 

Following the previous post, after debugging, I thought about printing through the serial port, and found some problems. The program is to change the LED flashing frequency by pressing keys, and there is no problem with debugging. The key is that I output a data through printf, and there is a problem. I used two serial port debugging assistants but did not receive data, and there was no display (the port and baud rate settings are all correct) (it is USB to serial port). Attached picture, please help, please help, where is the problem?

mmexport1661154727706.png (0 Bytes, downloads: 0)

mmexport1661154727706.png

IMG_20220822_155017.jpg (0 Bytes, downloads: 0)

IMG_20220822_155017.jpg

mmexport1661154726336.png (0 Bytes, downloads: 0)

mmexport1661154726336.png

mmexport1661154722393.png (0 Bytes, downloads: 0)

mmexport1661154722393.png

mmexport1661154724099.png (0 Bytes, downloads: 0)

mmexport1661154724099.png

mmexport1661154841853.png (0 Bytes, downloads: 0)

mmexport1661154841853.png
This post is from Domestic Chip Exchange

Latest reply

Find the official UART routine  Details Published on 2022-8-23 19:03
 
 

29

Posts

0

Resources
2
 

Don't sink

This post is from Domestic Chip Exchange
 
 
 

29

Posts

0

Resources
3
 

Help

This post is from Domestic Chip Exchange
 
 
 

29

Posts

0

Resources
4
 

IAR compiled

This post is from Domestic Chip Exchange
 
 
 

29

Posts

0

Resources
5
 

There is no problem with program debugging, and the LED flashes normally

This post is from Domestic Chip Exchange
 
 
 

9717

Posts

24

Resources
6
 

Are printf related functions defined?

This post is from Domestic Chip Exchange
 
 
 

6787

Posts

2

Resources
7
 

Do I need to turn on the [RTS/CTS] function?

This post is from Domestic Chip Exchange
 
 
 

5221

Posts

239

Resources
8
 

Can you provide the program? Find someone on the forum who has tested this board and can help you test it.

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

I posted another thread, with the serial port printing problem of the domestic AC7801X chip (with program) https://bbs.eeworld.com.cn/thread-1215482-1-1.html  Details Published on 2022-8-23 08:59
 
 
 

29

Posts

0

Resources
9
 
nmg posted on 2022-8-22 22:09 Can you provide the program? Find someone in the forum who has tested this board and can help you test it

Sure, how can I send it to you?

This post is from Domestic Chip Exchange
 
 
 

29

Posts

0

Resources
10
 
wangerxian posted on 2022-8-22 17:56 Do I need to turn on the [RTS/CTS] function?

I'm not sure about this.

This post is from Domestic Chip Exchange

Comments

[attachimg]634920[/attachimg]Use the serial port assistant to turn this on and try to see if the communication is normal!  Details Published on 2022-8-23 09:12
 
 
 

29

Posts

0

Resources
11
 
littleshrimp posted on 2022-8-22 17:55 Are printf-related functions defined?

Is that so?

mmexport1661215130611.png (0 Bytes, downloads: 0)

mmexport1661215130611.png
This post is from Domestic Chip Exchange

Comments

int fputc(int ch, FILE *f) You need to write the serial port output function here  Details Published on 2022-8-23 09:25
 
 
 

29

Posts

0

Resources
12
 
nmg posted on 2022-8-22 22:09 Can you provide the program? Find someone in the forum who has tested this board and can help you test it

I posted another post with the program attached.

Serial port printing problem of domestic AC7801X chip (with program) https://bbs.eeworld.com.cn/thread-1215482-1-1.html

This post is from Domestic Chip Exchange
 
 
 

6787

Posts

2

Resources
13
 
felsh posted on 2022-8-23 08:38 I’m not sure about this

Use the serial port assistant to open this and try to see if it can communicate normally!

This post is from Domestic Chip Exchange
 
 
 

9717

Posts

24

Resources
14
 
felsh posted on 2022-8-23 08:39 Is that so?

int fputc(int ch, FILE *f) You need to write the serial port output function here

This post is from Domestic Chip Exchange

Comments

int fputc(int ch, FILE *f) { /* Send one byte of data */ EUSCI_A_UART_transmitData(EUSCI_A1_BASE, (int8_t) ch);   Details Published on 2022-8-23 09:51
 
 
 

29

Posts

0

Resources
15
 
littleshrimp posted on 2022-8-23 09:25 int fputc(int ch, FILE *f) You need to write the serial port output function here
  1. int fputc(int ch, FILE *f)
  2. {
  3. /* Send one byte of data */
  4. EUSCI_A_UART_transmitData(EUSCI_A1_BASE, (int8_t) ch);
  5. /* Wait for sending to complete */
  6. while (EUSCI_A_UART_queryStatusFlags(EUSCI_A1_BASE, EUSCI_A_UART_BUSY) != RESET);
  7. return (ch);
  8. }
  9. This kind of thing, will it always report errors?
This post is from Domestic Chip Exchange
 
 
 

29

Posts

0

Resources
16
 
wangerxian posted on 2022-8-23 09:12 Use the serial port assistant to turn this on and see if it can communicate normally!

I didn't find this. I used these two assistants.

This post is from Domestic Chip Exchange

Comments

Download a friendly serial port assistant.  Details Published on 2022-8-23 10:44
 
 
 

6787

Posts

2

Resources
17
 
felsh posted on 2022-8-23 09:57 I didn't find this, these two assistants I used

Download a friendly serial port assistant.

This post is from Domestic Chip Exchange

Comments

OK   Details Published on 2022-8-23 13:26
 
 
 

9717

Posts

24

Resources
18
 

Where did you copy the EUSCI_A_UART_queryStatusFlags function from? Look at the definition of RESET there.

This post is from Domestic Chip Exchange

Comments

Nothing is defined, just copied directly from the Internet. I saw a lot of such redefinitions, but they don't work in my program.  Details Published on 2022-8-23 13:31
 
 
 

29

Posts

0

Resources
19
 
wangerxian posted on 2022-8-23 10:44 Download a friendly serial port assistant.

OK

This post is from Domestic Chip Exchange
 
 
 

29

Posts

0

Resources
20
 
littleshrimp posted on 2022-8-23 10:52 Where did you copy the EUSCI_A_UART_queryStatusFlags function? Look at the definition of RESET there

Nothing is defined, just copied directly from the Internet. I saw a lot of such redefinitions, but they don't work in my program.

This post is from Domestic Chip Exchange

Comments

You need to write the function of sending data through the serial port of your own microcontroller.  Details Published on 2022-8-23 14:16
You need to write the function of sending data through the serial port of your own microcontroller.  Details Published on 2022-8-23 14:08
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list