Monday, December 11th 2017, 10:24am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

markuskrug

Beginner

Date of registration: Oct 19th 2016

Posts: 11

1

Friday, November 10th 2017, 4:13pm

[SOLVED] 'Hello World' examples runs 64 instead of 100 loops

Dear all,

I just start with EmbeddedStudio. While I was testing with the 'Hello World' example that seems to be created each time you setup a new project I find out that in the DebugTerminal only 64 iterations of the 'Hello World' is shown. As far as I understand the program code it should be 100 times. Can anyone explain it to me?

Best Regards
Markus

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

2

Friday, November 10th 2017, 4:28pm

Hello Markus,

Thank you for your inquiry.
This issue is related to the target device being "too fast".
In the example application you are printing messages with a very high speed and that is all the application is doing.
So the default RTT buffer which is set to accompany 64 printf strings per default overflows.

To get your "100" you have several options.
- Slow down the CPU (usually not wanted by the user)
- Implement a little delay block between the printfs
- Edit the RTT Buffer in the SEGGER_RTT_Conf.h file linked in your project: There search for BUFFER_SIZE_UP and increased the value to e.g. 2048
- Change the RTT behavior if the buffer is full from SEGGER_RTT_MODE_NO_BLOCK_SKIP to SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL

Best regards,
Nino

markuskrug

Beginner

Date of registration: Oct 19th 2016

Posts: 11

3

Saturday, November 11th 2017, 1:38am

Dear Nino,

thanks for your answer. I will insert a small delay when I start integrating FreeRTOS to my project and test the issue again. I currently work on a SAME70 board that needs the entire 300MHz because of a lot of demanding workload.
However, I guess in real-world applications it is not a big think because you don't use extensively the printf() function in real-time applications.

Best Regards
Markus

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

4

Monday, November 13th 2017, 9:16am

Hello Markus,

Great to hear that the solution works for you.
We will consider this case as closed.

Best regards,
Nino