Date   

Re: Using shell with RTT console on nRF52840 DK

Rodrigo Peixoto <rodrigopex@...>
 

Mike,
I have created the issue (#8394). I will try to start that.


Thank you,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Re: Using shell with RTT console on nRF52840 DK

Michael Rosen
 

Rodrigo,

 

Unfortunately, as RTT is just buffers in memory, there is no good way I can think of except to have a low priority background thread which polls the input channel using GetKey() and yields if negative (basically what WaitKey() does but with a yield). It might be a good idea to create an issue on github to track this request if you haven’t already.

 

Mike

 

From: Cufi, Carles [mailto:Carles.Cufi@...]
Sent: Thursday, June 14, 2018 7:02 AM
To: Rodrigo Peixoto <rodrigopex@...>; Rosen, Michael R <michael.r.rosen@...>; Chruściński, Krzysztof <Krzysztof.Chruscinski@...>
Cc: users@...
Subject: RE: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Hi Rodrgo,

 

Krzysztof (on copy) is working on RTT and logging as well.

 

There’s this PR from him under review at the moment: https://github.com/zephyrproject-rtos/zephyr/pull/8110

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Rodrigo Peixoto
Sent: 14 June 2018 15:58
To: Rosen, Michael R <michael.r.rosen@...>
Cc: users@...
Subject: Re: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Mike,

 

I was taking a look at the uart_console and I couldn't any straight solution for RTT.

Uart has a device driver that enables us to use an ISR approach which is cool. There is no device driver for the SEGGER (at least, I could not find it), so the only thing I have in mind right now is to make a polling on the SEGGER_RTT_HasData function to see if there is data to be read from the host, if so write it to the input hook. For me, it seems to be a not so good solution. What do you think? Any other idea?

 

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 

Image removed by sender.

 


Re: Need help on I2C burst write APIs

Carles Cufi
 

Hi there,

 

Not sure if it will solve your issue, but there is a Pull Request that rewrites the I2C implementation for nRF using Nordic’s official implementation (nrfx):

https://github.com/zephyrproject-rtos/zephyr/pull/7788

 

Carles

 

From: users@... <users@...> On Behalf Of dhguja@...
Sent: 14 June 2018 18:22
To: users@...
Subject: [Zephyr-users] Need help on I2C burst write APIs

 

Hello,
       I am using Zephyr 1.11 version and nRF52840 dev kit. I am trying to use I2C driver to communicate with a I2C device. 

My scenario is as below,

1) When i try to use i2c_burst_write API to send more than 1 byte, data is not issued to device after first byte.

2) i2c_burst_read API is working as expected. 

3) I went through the API definition code and found that burst write is split into two separate I2C transactions.

msg[0].buf = &start_addr;
msg[0].len = 1;
msg[0].flags = I2C_MSG_WRITE;

msg[1].buf = buf;
msg[1].len = num_bytes;
msg[1].flags = I2C_MSG_WRITE | I2C_MSG_STOP;

This separates the I2C interactions as 2 Tx msgs during burst write and data is not written beyond 1 byte.

I have attached the expected I2C burst write mode from my slave device data sheet. But when i analysed transactions using logic analyzer i saw transactions split into two I2C writes.

4) I also noticed that i2c_reg_read_byte uses i2c_burst_read underneath with 1 byte. But i2c_reg_write_byte uses i2c_write with combined address and data buffer. 

Not sure whether this behavior is expected or someone noticed this?

I can also use i2c_write directly to write more than 1 bytes with my device. But just curious if i am missing something while using those burst mode APIs.

Regards,
Dhananjay G J


Need help on I2C burst write APIs

dhguja@gmail.com
 

Hello,
       I am using Zephyr 1.11 version and nRF52840 dev kit. I am trying to use I2C driver to communicate with a I2C device. 

My scenario is as below,

1) When i try to use i2c_burst_write API to send more than 1 byte, data is not issued to device after first byte.

2) i2c_burst_read API is working as expected. 

3) I went through the API definition code and found that burst write is split into two separate I2C transactions.

msg[0].buf = &start_addr;
msg[0].len = 1;
msg[0].flags = I2C_MSG_WRITE;

msg[1].buf = buf;
msg[1].len = num_bytes;
msg[1].flags = I2C_MSG_WRITE | I2C_MSG_STOP;

This separates the I2C interactions as 2 Tx msgs during burst write and data is not written beyond 1 byte.

I have attached the expected I2C burst write mode from my slave device data sheet. But when i analysed transactions using logic analyzer i saw transactions split into two I2C writes.

4) I also noticed that i2c_reg_read_byte uses i2c_burst_read underneath with 1 byte. But i2c_reg_write_byte uses i2c_write with combined address and data buffer. 

Not sure whether this behavior is expected or someone noticed this?

I can also use i2c_write directly to write more than 1 bytes with my device. But just curious if i am missing something while using those burst mode APIs.

Regards,
Dhananjay G J



Re: k_sleep on mimxrt1050_evk board

Maureen Helm
 

Hi Marco,

Can you please try samples/basic/blinky or samples/synchronization? These samples should work on this board, but I’m currently traveling and don’t have hardware with me to check if they recently got broken.

 

Maureen

 

From: users@... [mailto:users@...] On Behalf Of Nashif, Anas
Sent: Thursday, June 14, 2018 4:29 AM
To: marco.hoefle@...; users@...
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board

 

Marco,

Can you please open a bug with the information below?

 

https://github.com/zephyrproject-rtos/zephyr/issues/new

 

Thanks,

Anas

 

From: users@... [mailto:users@...] On Behalf Of marco.hoefle@...
Sent: Thursday, June 14, 2018 4:20 AM
To: users@...
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board

 

I tried now to implement a sleep using the timer api, I think this is broken too.
Again, works on qemu port, doesn't on the mimxrt1050_evk

static void timer_expiry(struct k_timer *work)
{
    printk("timer expired!\n");
}


static void test_timer(void)
{
    k_timer_init(&timer_1, timer_expiry, NULL);
    k_timer_start(&timer_1, K_SECONDS(1), 0);
}


GDB:
(gdb) load /home/marco/projects/avnet/zephyr_demo/sw/build/mimxrt1050_evk/zephyr/zephyr.elf
Loading section text, size 0x4d2a lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x4d2c
Loading section devconfig, size 0x84 lma 0x4d34
Loading section rodata, size 0xa04 lma 0x4db8
Loading section datas, size 0x6c lma 0x57bc
Loading section initlevel, size 0x84 lma 0x5828
Loading section initshell, size 0x1c lma 0x58ac
Start address 0x32b4, load size 22726
Transfer rate: 88 KB/sec, 2066 bytes/write.
(gdb) break test_timer
Note: breakpoint 3 also set at pc 0xc3c.
Breakpoint 4 at 0xc3c: file /home/marco/projects/avnet/zephyr_demo/sw/src/main.c, line 84.
(gdb) del
Delete all breakpoints? (y or n) y
(gdb) break test_timer
Breakpoint 5 at 0xc3c: file /home/marco/projects/avnet/zephyr_demo/sw/src/main.c, line 84.
(gdb) c
Continuing.

Breakpoint 5, test_timer () at /home/marco/projects/avnet/zephyr_demo/sw/src/main.c:84
84    {
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb)


Re: Using shell with RTT console on nRF52840 DK

Carles Cufi
 

Hi Rodrgo,

 

Krzysztof (on copy) is working on RTT and logging as well.

 

There’s this PR from him under review at the moment: https://github.com/zephyrproject-rtos/zephyr/pull/8110

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Rodrigo Peixoto
Sent: 14 June 2018 15:58
To: Rosen, Michael R <michael.r.rosen@...>
Cc: users@...
Subject: Re: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Mike,

 

I was taking a look at the uart_console and I couldn't any straight solution for RTT.

Uart has a device driver that enables us to use an ISR approach which is cool. There is no device driver for the SEGGER (at least, I could not find it), so the only thing I have in mind right now is to make a polling on the SEGGER_RTT_HasData function to see if there is data to be read from the host, if so write it to the input hook. For me, it seems to be a not so good solution. What do you think? Any other idea?

 

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 

 


Re: Using shell with RTT console on nRF52840 DK

Rodrigo Peixoto <rodrigopex@...>
 

Mike,

I was taking a look at the uart_console and I couldn't any straight solution for RTT.
Uart has a device driver that enables us to use an ISR approach which is cool. There is no device driver for the SEGGER (at least, I could not find it), so the only thing I have in mind right now is to make a polling on the SEGGER_RTT_HasData function to see if there is data to be read from the host, if so write it to the input hook. For me, it seems to be a not so good solution. What do you think? Any other idea?


Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Re: What is the process to enable bluetooth so that nrf52832 is disciverable by other device (android phone) #ble #bluetoothmesh #nrf52832

Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
 

Hi Rajat,

Please refer to Zephyr documentation: http://docs.zephyrproject.org/index.html

Bluetooth specific:

Bluetooth samples and their documentation can be found under: samples/bluetooth/*

For simple hands on, you can try the peripheral_hr and central_hr samples.

If there is something not mentioned in the documentations, please free to comment or contribute by sending a pull request.

Regards,
Vinayak


On 14 Jun 2018, at 12:44, Rajat Kalyan <rajatkalyan95@...> wrote:

Hey everyone

I have just started working on nrf52832 board. I want to enable the Bluetooth which is their on the board and set it to discoverable mode(if by default,its not)

I couldnot understand a bit of the sample bluetooth codes given.
Can anyone suggest me some procedure to enable the bluetooth and pair it with my mobile phone.

Thanks 


Re: Attempt to build an out-of-tree RTC driver

Kiril Zyapkov
 

So this is now #8379. Thanks!

On Thu, 14 Jun 2018 at 14:43, Kiril Zyapkov <kiril.zyapkov@gmail.com> wrote:

Hi all,

Newcomer here, trying to properly use the RTC hardware of an STM32Lxx chip.

I wasn't able to build my driver attempt out-of-tree. It requires
`RTC` and `USE_STM32_LL_RTC` to be selected. Selecting the `RTC`
option results in the following build failure:

CMake Error at zephyr/CMakeLists.txt:503 (message):
The Zephyr library 'drivers__rtc' was created without source files. Empty
(non-imported) libraries are not supported. Either make sure that the
library has the sources it should have, or make sure it is not created when
it has no source files.

The second symbol is a hidden one, and there are some problems with
setting it's default from an application Kconfig file. Here is a
bare-bones app which tries to set it, and succeeds:

https://github.com/kzyapkov/zephyr-set-hidden-option

However, if BOARD is set in environment instead of cmake the
USE_STM32_LL_RTC symbol is not selected.

Given those, I'll work on my driver in-tree, but I hope you can shed
some light on the issues. I saw #5554 which was rejected because
subsystems should be in the driver. However, it seems out-of-tree
drivers for existing subsystems are still not easily doable still.

Thanks,

Kiril



Attempt to build an out-of-tree RTC driver

Kiril Zyapkov
 

Hi all,

Newcomer here, trying to properly use the RTC hardware of an STM32Lxx chip.

I wasn't able to build my driver attempt out-of-tree. It requires
`RTC` and `USE_STM32_LL_RTC` to be selected. Selecting the `RTC`
option results in the following build failure:

CMake Error at zephyr/CMakeLists.txt:503 (message):
The Zephyr library 'drivers__rtc' was created without source files. Empty
(non-imported) libraries are not supported. Either make sure that the
library has the sources it should have, or make sure it is not created when
it has no source files.

The second symbol is a hidden one, and there are some problems with
setting it's default from an application Kconfig file. Here is a
bare-bones app which tries to set it, and succeeds:

https://github.com/kzyapkov/zephyr-set-hidden-option

However, if BOARD is set in environment instead of cmake the
USE_STM32_LL_RTC symbol is not selected.

Given those, I'll work on my driver in-tree, but I hope you can shed
some light on the issues. I saw #5554 which was rejected because
subsystems should be in the driver. However, it seems out-of-tree
drivers for existing subsystems are still not easily doable still.

Thanks,

Kiril


Re: k_sleep on mimxrt1050_evk board

Nashif, Anas
 

Marco,

Can you please open a bug with the information below?

 

https://github.com/zephyrproject-rtos/zephyr/issues/new

 

Thanks,

Anas

 

From: users@... [mailto:users@...] On Behalf Of marco.hoefle@...
Sent: Thursday, June 14, 2018 4:20 AM
To: users@...
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board

 

I tried now to implement a sleep using the timer api, I think this is broken too.
Again, works on qemu port, doesn't on the mimxrt1050_evk

static void timer_expiry(struct k_timer *work)
{
    printk("timer expired!\n");
}


static void test_timer(void)
{
    k_timer_init(&timer_1, timer_expiry, NULL);
    k_timer_start(&timer_1, K_SECONDS(1), 0);
}


GDB:
(gdb) load /home/marco/projects/avnet/zephyr_demo/sw/build/mimxrt1050_evk/zephyr/zephyr.elf
Loading section text, size 0x4d2a lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x4d2c
Loading section devconfig, size 0x84 lma 0x4d34
Loading section rodata, size 0xa04 lma 0x4db8
Loading section datas, size 0x6c lma 0x57bc
Loading section initlevel, size 0x84 lma 0x5828
Loading section initshell, size 0x1c lma 0x58ac
Start address 0x32b4, load size 22726
Transfer rate: 88 KB/sec, 2066 bytes/write.
(gdb) break test_timer
Note: breakpoint 3 also set at pc 0xc3c.
Breakpoint 4 at 0xc3c: file /home/marco/projects/avnet/zephyr_demo/sw/src/main.c, line 84.
(gdb) del
Delete all breakpoints? (y or n) y
(gdb) break test_timer
Breakpoint 5 at 0xc3c: file /home/marco/projects/avnet/zephyr_demo/sw/src/main.c, line 84.
(gdb) c
Continuing.

Breakpoint 5, test_timer () at /home/marco/projects/avnet/zephyr_demo/sw/src/main.c:84
84    {
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb)


Re: What is the process to enable bluetooth so that nrf52832 is disciverable by other device (android phone) #ble #bluetoothmesh #nrf52832

vikrant8051 <vikrant8051@...>
 

Hi Rajat,

This could be helpful

You've to make changes as per your Board design.

regards,
vikrant

On Thu, Jun 14, 2018 at 4:14 PM, Rajat Kalyan <rajatkalyan95@...> wrote:
Hey everyone

I have just started working on nrf52832 board. I want to enable the Bluetooth which is their on the board and set it to discoverable mode(if by default,its not)

I couldnot understand a bit of the sample bluetooth codes given.
Can anyone suggest me some procedure to enable the bluetooth and pair it with my mobile phone.

Thanks 



What is the process to enable bluetooth so that nrf52832 is disciverable by other device (android phone) #ble #bluetoothmesh #nrf52832

Rajat Kalyan
 

Hey everyone

I have just started working on nrf52832 board. I want to enable the Bluetooth which is their on the board and set it to discoverable mode(if by default,its not)

I couldnot understand a bit of the sample bluetooth codes given.
Can anyone suggest me some procedure to enable the bluetooth and pair it with my mobile phone.

Thanks 


Re: k_sleep on mimxrt1050_evk board

marco.hoefle@...
 

I tried now to implement a sleep using the timer api, I think this is broken too.
Again, works on qemu port, doesn't on the mimxrt1050_evk

static void timer_expiry(struct k_timer *work)
{
    printk("timer expired!\n");
}


static void test_timer(void)
{
    k_timer_init(&timer_1, timer_expiry, NULL);
    k_timer_start(&timer_1, K_SECONDS(1), 0);
}


GDB:
(gdb) load /home/marco/projects/avnet/zephyr_demo/sw/build/mimxrt1050_evk/zephyr/zephyr.elf
Loading section text, size 0x4d2a lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x4d2c
Loading section devconfig, size 0x84 lma 0x4d34
Loading section rodata, size 0xa04 lma 0x4db8
Loading section datas, size 0x6c lma 0x57bc
Loading section initlevel, size 0x84 lma 0x5828
Loading section initshell, size 0x1c lma 0x58ac
Start address 0x32b4, load size 22726
Transfer rate: 88 KB/sec, 2066 bytes/write.
(gdb) break test_timer
Note: breakpoint 3 also set at pc 0xc3c.
Breakpoint 4 at 0xc3c: file /home/marco/projects/avnet/zephyr_demo/sw/src/main.c, line 84.
(gdb) del
Delete all breakpoints? (y or n) y
(gdb) break test_timer
Breakpoint 5 at 0xc3c: file /home/marco/projects/avnet/zephyr_demo/sw/src/main.c, line 84.
(gdb) c
Continuing.

Breakpoint 5, test_timer () at /home/marco/projects/avnet/zephyr_demo/sw/src/main.c:84
84    {
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb)


Re: k_sleep on mimxrt1050_evk board

marco.hoefle@...
 

Hello Andy,
on both ports (qemu and mimxrt1050_evk)
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100 is used.
k_uptime_get_32() is working on both ports, k_uptime_get only on the qemu port.
k_sleep is not working on the mimxrt1050_evk. The behavior is really weird.
when using this thread function:

void thread_1(void *dummy1, void *dummy2, void *dummy3)
{
    int loops = 1;
    while(1) {
//        for(volatile int i=0; i<100000000; i++);
        printk("Thread 1: Loops: %d, uptime: %d\n", loops++, k_uptime_get_32());
        k_sleep(100);
    }
}

The thread is stuck in k_sleep and the shell uptime command is wrong:

***** Booting Zephyr OS 1.12.0 *****
Zephyr Shell, Zephyr version: 1.12.0
Type 'help' for a list of available commands
shell> built: Jun 14 2018 09:41:37
Thread 1: Loops: 1, uptime: 10

shell> select kernel
kernel> uptime
uptime: 10 ms
kernel> uptime
uptime: 10 ms
kernel> uptime


using this thread function everything works as expected:
void thread_1(void *dummy1, void *dummy2, void *dummy3)
{
    int loops = 1;
    while(1) {
        for(volatile int i=0; i<100000000; i++);
        printk("Thread 1: Loops: %d, uptime: %d\n", loops++, k_uptime_get_32());
//        k_sleep(100);
    }
}

***** Booting Zephyr OS 1.12.0 *****
Zephyr Shell, Zephyr version: 1.12.0
Type 'help' for a list of available commands
shell> built: Jun 14 2018 09:44:03
Thread 1: Loops: 1, uptime: 1510
Thread 1: Loops: 2, uptime: 3010
Thread 1: Loops: 3, uptime: 4510
selecThread 1: Loops: 4, uptime: 6020
t kerneThread 1: Loops: 5, uptime: 7520
l
kernel> Thread 1: Loops: 6, uptime: 9020
uptime
uptime: 10250 ms
kernel> Thread 1: Loops: 7, uptime: 10530
uptimeThread 1: Loops: 8, uptime: 12030

uptime: 12170 ms
kernel> upThread 1: Loops: 9, uptime: 13540
time
uptime: 14210 ms
kernel> Thread 1: Loops: 10, uptime: 15040
Thread 1: Loops: 11, uptime: 16540
Thread 1: Loops: 12, uptime: 18050

Marco


compiling issue for nRF52840_PDK

vikrant8051 <vikrant8051@...>
 

Hi,

I am getting this error.

-- Selected BOARD nrf52840_pca10056
Zephyr version: 1.12.99
Parsing Kconfig tree in /home/vikrant/projects/zephyr/zephyr/Kconfig
Using /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh/build/zephyr/.config as base
CMake Warning at /home/vikrant/projects/zephyr/zephyr/cmake/toolchain.cmake:14 (message):
  ZEPHYR_GCC_VARIANT is deprecated, please use ZEPHYR_TOOLCHAIN_VARIANT
  instead
Call Stack (most recent call first):
  /home/vikrant/projects/zephyr/zephyr/cmake/app/boilerplate.cmake:242 (include)
  CMakeLists.txt:3 (include)


-- Generating zephyr/include/generated/generated_dts_board.h
In file included from /home/vikrant/projects/zephyr/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts:8:0,
                 from <command-line>:0:
/home/vikrant/projects/zephyr/zephyr/dts/arm/nordic/nrf52840.dtsi:2:33: fatal error: dt-bindings/i2c/i2c.h: No such file or directory
 #include <dt-bindings/i2c/i2c.h>

                                 ^
compilation terminated.
CMake Error at /home/vikrant/projects/zephyr/zephyr/cmake/dts.cmake:69 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/vikrant/projects/zephyr/zephyr/cmake/app/boilerplate.cmake:268 (include)
  CMakeLists.txt:3 (include)


-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh/build/CMakeFiles/CMakeOutput.log".
See also "/home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh/build/CMakeFiles/CMakeError.log".
Makefile:680: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1

Please help me to resolve it. ThankYou !!


Re: Using shell with RTT console on nRF52840 DK

Rodrigo Peixoto <rodrigopex@...>
 

Thank you.

I'll try to start that.

Best regards,
Rodrigo Peixoto

On Wed, 13 Jun 2018 at 19:45 Rosen, Michael R <michael.r.rosen@...> wrote:

Rodrigo

 

Currently, the RTT console driver doesn’t support input (ie, from a host to device). You would have to add this functionality to the RTT console driver (drivers/console/rtt_console.c) and the shell subsystem to interact with it (subsys/shell/shell.c); you can use the uart_console as a reference (drivers/console/uart_console.c).

 

Mike

 

From: users@... [mailto:users@...] On Behalf Of Rodrigo Peixoto
Sent: Wednesday, June 13, 2018 3:34 PM
To: users@...
Subject: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Hi,

I am trying to use the shell feature with the RTT console. I can see the SYS_LOG output with the pyrtt-viwer but I cannot write any command.

 

Any clue on that?

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 

--
Rodrigo Peixoto
Co-founder and Technical guru

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex

.


Re: Using shell with RTT console on nRF52840 DK

Michael Rosen
 

Rodrigo

 

Currently, the RTT console driver doesn’t support input (ie, from a host to device). You would have to add this functionality to the RTT console driver (drivers/console/rtt_console.c) and the shell subsystem to interact with it (subsys/shell/shell.c); you can use the uart_console as a reference (drivers/console/uart_console.c).

 

Mike

 

From: users@... [mailto:users@...] On Behalf Of Rodrigo Peixoto
Sent: Wednesday, June 13, 2018 3:34 PM
To: users@...
Subject: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Hi,

I am trying to use the shell feature with the RTT console. I can see the SYS_LOG output with the pyrtt-viwer but I cannot write any command.

 

Any clue on that?

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 


Using shell with RTT console on nRF52840 DK

Rodrigo Peixoto <rodrigopex@...>
 

Hi,
I am trying to use the shell feature with the RTT console. I can see the SYS_LOG output with the pyrtt-viwer but I cannot write any command.

Any clue on that?

Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex



Re: k_sleep on mimxrt1050_evk board

Andy Ross
 

Are you building a tickless kernel?  Note that k_uptime_get_32() requires you to explicitly enable the clock (c.f. k_enable_sys_clock_always_on()) if you want to count ticks.

Andy

From: Marco Hoefle <marco.hoefle@...>
Sent: Wednesday, June 13, 2018 8:30AM
To: Users
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board
I did some further tests,
threads and scheduler are basically working, i used these two functions:

void thread_1(void *dummy1, void *dummy2, void *dummy3)
{
    int loops = 1;
    while(1) {
        for(volatile int i=0; i<100000000; i++);
        printk("1: Loops: %d\n", loops++);
        k_yield();
    }
}


void thread_2(void *dummy1, void *dummy2, void *dummy3)
{
    int loops = 1;
    while(1) {
        for(volatile int i=0; i<100000000; i++);
        printk("2: Loops: %d\n", loops++);
        printk("clk count: %d\n", k_uptime_get());
        k_yield();
    }
}

However,
k_uptime_get returns always 0. Using the the qemu port works.
***** Booting Zephyr OS 1.12.0 *****                                                                                                                                                                                                                                   
built: Jun 13 2018 17:18:51                                                                                                                     
1: Loops: 1                                                                                                                                     
2: Loops: 1                                                                                                                                     
clk count: 0                                                                                                                                    
1: Loops: 2                                                                                                                                     
2: Loops: 2                                                                                                                                     
clk count: 0                                                                                                                                    
1: Loops: 3                                                                                                                                     
2: Loops: 3                                                                                                                                     
clk count: 0                                                                                                                                    
1: Loops: 4

on qemu:
***** Booting Zephyr OS 1.12.0 *****
built: Jun 13 2018 17:14:50
1: Loops: 1
2: Loops: 1
clk count: 1050
1: Loops: 2
2: Loops: 2
clk count: 2120
1: Loops: 3
2: Loops: 3
clk count: 3170
1: Loops: 4

I compared the two zephyr configs but I didn't see the option for the different behavior.



1701 - 1720 of 2609