I am following this example for my board. I need help with RTT Viewer. I am connected to e2studio debug perspective and running the example.
Then I open the RTT viewer with below settings:
The viewer displays below details:
What's the next step now?
I typed 100 in the line and hit enter. LED1 turns RED. But It says WARNING: Sent 0 of 4 bytes. What does that mean? I type different values nothing happens to LED.
I do not see any banner info being printed. How does Tera Term works with this?
Am I missing something? This is my first day with the board.
In my end application, I want to print lots of data on serial console with printf.
Thank you for the help.
Thanks for reaching out Renesas Engineering Community!
This project in e2studio includes two stacks. One stack for UART communication and one other stack which is a general PWM Timer.
The red led…
The red led ,which turns on is configured as the output of the timer.
So, when the timer starts the led turns on. For this project the hardware requirements are a USB-TTL connector in order to implement the communication through UART between your pc and the MCU (RA6M5). You will also need the JLinkRTTViewer and the Tera Term.
In your case (CK-RA6M5 ) you should connect
ATTENTION: You should set the same baud rate to your Serial Terminal as the configured in UART stack properties. In your case it is the default 115200 bps.
1)You connect your MCU board with the PC through USB Debug.
2)You open JLinkRTTViewer and connect your device. Check from the terminal logs it is connected.
3)Upload from e2studio your code to the MCU.
After this process you should see all the printed messages in your JLinkRTTViewer:
On your MCU board you will see the red led turned ON.
Later, we should configure Tera Term in order to implement communication between your pc and MCU.
Open Tera Term choose your Port in my case COM4.
Go to Setup->Terminal end set your terminal settings you could enable local echo.
Later go to Setup->Serial port and set your serial communication settings:
When everything is configured you could type a value on the Tera Term terminal in order to set the intensity of red LED.
By typing different values you will see the led's intensity changing . In case it is invalid it will print back a message as shown in the picture.
In case you want to print more Data in your application in JLinkRTTViewer use the APP_PRINT macro. If you want your values to be shown in Tera Term you should use the UART API :
fsp_err_t R_SCI_UART_Write (uart_ctrl_t *const p_api_ctrl, uint8_t const *const p_src, uint32_t const bytes)
Thank you for clarifying this example for me. For JLinkRTTViewer, is the USB-TTL connector necessary? I am still waiting on my cable to be delivered and wondering without any external HW if I can see the printed output somewhere.
No the USB-TTL connector is not necessary if you replace the UART interface with the RTT commands as Sergey told you. The USB-TTL connector is only needed if you want to implement UART communication with your PC and Tera Term is needed as a Serial Terminal in this case only. If you run the specific example you will see that any message which is printed with APP_PRINT() is printed in JLinkRTTViewer and any message which is in
R_SCI_UART_Write (uart_ctrl_t *const p_api_ctrl, uint8_t const *const p_src, uint32_t const bytes)
API will be printed in Tera Term (Serial Terminal).