Date   

Are these 5 registers required for 802.15.4 in Zephyr #nrf52480 #networking

Brenton Chetty
 

Hi, I am trying to run Zephyr 802.15.4 samples in Renode for the NRF52840.

On Renode I receive warnings that Renode does not implement the following 5 registers:
  • NVMC:ICACHECNF
  • EGU3:INTENSET
  • EGU3:INTENCLR
  • TEMP:INTENSET
  • TEMP:TASKS_START
Are these registers critical for 802.15.4 or openthread on Zephyr?

I managed to successfully run BLE Zephyr samples on Renode even though renode gives warnings that the following 2 registers are unimplemented"
  • NVMC:ICACHECNF
  • TEMP:INTENSET
Regards
Brenton


Debug on Teensy 4.1

Dave Nadler
 

I'm thinking of using Teensey 4.1 with Zephyr.
After I ordered a few Teensy, I found out there is no SWD or JTAG connection for my trusty Segger J-Link!
Debugging is mentioned here: https://docs.zephyrproject.org/latest/boards/arm/teensy4/doc/index.html
Unfortunately the page doesn't explain what kind of debugging is supported.

Does the Zephyr toolchain support including a GD stub so GDB can be used over serial port?
How does one debug a Teensey application and Zephyr?

Thanks!
Best Regards, Dave

-- 
Dave Nadler, USA East Coast voice (978) 263-0097, drn@..., Skype 
 Dave.Nadler1


Re: Trouble develop with CAN & MCP2515/2518

MARINO SILVIO <m.silvio@...>
 

Hello Hendrix,

with your suggestions, i was able to compile and test the test program on mcp2515 with a nrf52840dk board. In fact, however, I have to make it work with a Thingy91 card using the spare gpio available. I tried to make an overlay file for thingy91_nrf52840.overlay but can't compile it. I'll send you the link with everything. I would be grateful if you could make me understand how to compile with thingy.

Best Regards

 signature_3051006535Silvio Marino

R&D Manager – Electronic Consultant

Phone: +39 346 1066499

Skype:  live:marino.silvio

Web: https://babos.it

P 

- Before printing think about environment and costs
- Prima di stampare pensa ai costi ambientali

 

Da: m.silvio@... <m.silvio@...>
Data: mercoledì, 21 settembre 2022 12:15
A: Henrik Brix Andersen <henrik@...>
Cc: users@... <users@...>
Oggetto: R: [Zephyr-users] Trouble develop with CAN & MCP2515/2518

Thank you Henrik

I will let you know,

 

Best Regards

 

Silvio

 

 

 signature_1826096540Silvio Marino

R&D Manager – Electronic Consultant

Phone: +39 346 1066499

Skype:  live:marino.silvio

Web: https://babos.it

P 

- Before printing think about environment and costs
- Prima di stampare pensa ai costi ambientali

 

 

Da: Henrik Brix Andersen <henrik@...>
Data: martedì, 20 settembre 2022 16:37
A: MARINO SILVIO <m.silvio@...>
Cc: users@... <users@...>
Oggetto: Re: [Zephyr-users] Trouble develop with CAN & MCP2515/2518

Hi,

Looks like you forgot to add the MCP2515 to your board devicetree.
See https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/shields/mcp2515/keyestudio_can_bus_ks0411.overlay for inspiration.

./Brix
-- 
Henrik Brix Andersen

> On 20 Sep 2022, at 09.11, MARINO SILVIO <m.silvio@...> wrote:
>
> Hi there,
> attached the compilation log of the sample 'counter' tested as is. i just changed the original prj.conf file to :
>
> CONFIG_POLL=y
> CONFIG_CAN=y
> CONFIG_SPI=y
> CONFIG_CAN_MCP2515=y
> CONFIG_CAN_INIT_PRIORITY=80
> CONFIG_CAN_MAX_FILTER=5
>
> CONFIG_SHELL=y
> CONFIG_CAN_SHELL=y
> CONFIG_DEVICE_SHELL=y
>
> CONFIG_GPIO=y
> CONFIG_STATS=y
> CONFIG_STATS_NAMES=y
> CONFIG_STATS_SHELL=y
> CONFIG_CAN_STATS=y
>
> Best regards
>
> Silvio
>
>
>
> Il giorno 20/09/22, 07:58 "MARINO SILVIO" <m.silvio@...> ha scritto:
>
>
>    Sorry. Attached picture
>
>
>    Il giorno 20/09/22, 07:57 "MARINO SILVIO" <m.silvio@...> ha scritto:
>
>        Hello Andersen,
>        I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
>        Thank you if you want to help me.
>        Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.
>
>         Silvio Marino
>
>
>        Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:
>
>            Hi,
>
>            You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
>            Are you trying to use Zephyr SocketCAN?
>
>            Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
>            - Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
>            - Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can
>
>            ./Brix
>            -- 
>            Henrik Brix Andersen
>
>> On 19 Sep 2022, at 09.22, m.silvio@... wrote:
>>
>> Hello,
>> see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending
>>
>> there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
>> Thank you very much.
>> Silvio
>>
>>
>>
>> <image001.png>Silvio Marino
>> R&D Manager – Electronic Consultant
>> Phone: +39 346 1066499
>> Skype:  live:marino.silvio
>> Web: https://babos.it
>> P
>> - Before printing think about environment and costs
>> - Prima di stampare pensa ai costi ambientali
>> >
>
> <log_compile.txt>


Re: Trouble develop with CAN & MCP2515/2518

m.silvio@babos.it <m.silvio@...>
 

Thank you Henrik

I will let you know,

 

Best Regards

 

Silvio

 

 

 signature_1826096540Silvio Marino

R&D Manager – Electronic Consultant

Phone: +39 346 1066499

Skype:  live:marino.silvio

Web: https://babos.it

P 

- Before printing think about environment and costs
- Prima di stampare pensa ai costi ambientali

 

 

Da: Henrik Brix Andersen <henrik@...>
Data: martedì, 20 settembre 2022 16:37
A: MARINO SILVIO <m.silvio@...>
Cc: users@... <users@...>
Oggetto: Re: [Zephyr-users] Trouble develop with CAN & MCP2515/2518

Hi,

Looks like you forgot to add the MCP2515 to your board devicetree.
See https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/shields/mcp2515/keyestudio_can_bus_ks0411.overlay for inspiration.

./Brix
-- 
Henrik Brix Andersen

> On 20 Sep 2022, at 09.11, MARINO SILVIO <m.silvio@...> wrote:
>
> Hi there,
> attached the compilation log of the sample 'counter' tested as is. i just changed the original prj.conf file to :
>
> CONFIG_POLL=y
> CONFIG_CAN=y
> CONFIG_SPI=y
> CONFIG_CAN_MCP2515=y
> CONFIG_CAN_INIT_PRIORITY=80
> CONFIG_CAN_MAX_FILTER=5
>
> CONFIG_SHELL=y
> CONFIG_CAN_SHELL=y
> CONFIG_DEVICE_SHELL=y
>
> CONFIG_GPIO=y
> CONFIG_STATS=y
> CONFIG_STATS_NAMES=y
> CONFIG_STATS_SHELL=y
> CONFIG_CAN_STATS=y
>
> Best regards
>
> Silvio
>
>
>
> Il giorno 20/09/22, 07:58 "MARINO SILVIO" <m.silvio@...> ha scritto:
>
>
>    Sorry. Attached picture
>
>
>    Il giorno 20/09/22, 07:57 "MARINO SILVIO" <m.silvio@...> ha scritto:
>
>        Hello Andersen,
>        I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
>        Thank you if you want to help me.
>        Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.
>
>         Silvio Marino
>
>
>        Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:
>
>            Hi,
>
>            You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
>            Are you trying to use Zephyr SocketCAN?
>
>            Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
>            - Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
>            - Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can
>
>            ./Brix
>            -- 
>            Henrik Brix Andersen
>
>> On 19 Sep 2022, at 09.22, m.silvio@... wrote:
>>
>> Hello,
>> see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending
>>
>> there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
>> Thank you very much.
>> Silvio
>>
>>
>>
>> <image001.png>Silvio Marino
>> R&D Manager – Electronic Consultant
>> Phone: +39 346 1066499
>> Skype:  live:marino.silvio
>> Web: https://babos.it
>> P
>> - Before printing think about environment and costs
>> - Prima di stampare pensa ai costi ambientali
>> >
>
> <log_compile.txt>


Re: Trouble develop with CAN & MCP2515/2518

Henrik Brix Andersen
 

Hi,

Looks like you forgot to add the MCP2515 to your board devicetree.
See https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/shields/mcp2515/keyestudio_can_bus_ks0411.overlay for inspiration.

./Brix
--
Henrik Brix Andersen

On 20 Sep 2022, at 09.11, MARINO SILVIO <m.silvio@...> wrote:

Hi there,
attached the compilation log of the sample 'counter' tested as is. i just changed the original prj.conf file to :

CONFIG_POLL=y
CONFIG_CAN=y
CONFIG_SPI=y
CONFIG_CAN_MCP2515=y
CONFIG_CAN_INIT_PRIORITY=80
CONFIG_CAN_MAX_FILTER=5

CONFIG_SHELL=y
CONFIG_CAN_SHELL=y
CONFIG_DEVICE_SHELL=y

CONFIG_GPIO=y
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
CONFIG_STATS_SHELL=y
CONFIG_CAN_STATS=y

Best regards

Silvio



Il giorno 20/09/22, 07:58 "MARINO SILVIO" <m.silvio@...> ha scritto:


Sorry. Attached picture


Il giorno 20/09/22, 07:57 "MARINO SILVIO" <m.silvio@...> ha scritto:

Hello Andersen,
I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
Thank you if you want to help me.
Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.

Silvio Marino


Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:

Hi,

You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
Are you trying to use Zephyr SocketCAN?

Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
- Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
- Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can

./Brix
--
Henrik Brix Andersen

On 19 Sep 2022, at 09.22, m.silvio@... wrote:

Hello,
see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending

there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
Thank you very much.
Silvio



<image001.png>Silvio Marino
R&D Manager – Electronic Consultant
Phone: +39 346 1066499
Skype: live:marino.silvio
Web: https://babos.it
P
- Before printing think about environment and costs
- Prima di stampare pensa ai costi ambientali


<log_compile.txt>


Re: Trouble develop with CAN & MCP2515/2518

MARINO SILVIO <m.silvio@...>
 

Hello,
I tried again with a more updated sample, the compilation does not give me more errors but does not see the CAN driver.

*** Booting Zephyr OS build v3.0.99-ncs1 ***
CAN test app
CAN: Device driver not found..

I am attaching the complete program with the results and some picture when reset board.
https://drive.google.com/file/d/1q3blO5DIFTnswNks9-Q5fS7JfFkLmmW0/view?usp=sharing
Thank you if you can help me
Best Regards
Silvio


Il giorno 20/09/22, 09:11 "MARINO SILVIO" <m.silvio@...> ha scritto:

Hi there,
attached the compilation log of the sample 'counter' tested as is. i just changed the original prj.conf file to :

CONFIG_POLL=y
CONFIG_CAN=y
CONFIG_SPI=y
CONFIG_CAN_MCP2515=y
CONFIG_CAN_INIT_PRIORITY=80
CONFIG_CAN_MAX_FILTER=5

CONFIG_SHELL=y
CONFIG_CAN_SHELL=y
CONFIG_DEVICE_SHELL=y

CONFIG_GPIO=y
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
CONFIG_STATS_SHELL=y
CONFIG_CAN_STATS=y

Best regards

Silvio



Il giorno 20/09/22, 07:58 "MARINO SILVIO" <m.silvio@...> ha scritto:


Sorry. Attached picture


Il giorno 20/09/22, 07:57 "MARINO SILVIO" <m.silvio@...> ha scritto:

Hello Andersen,
I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
Thank you if you want to help me.
Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.

Silvio Marino


Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:

Hi,

You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
Are you trying to use Zephyr SocketCAN?

Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
- Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
- Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can

./Brix
--
Henrik Brix Andersen

On 19 Sep 2022, at 09.22, m.silvio@... wrote:
>
> Hello,
> see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending
>
> there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
> Thank you very much.
> Silvio
>
>
>
> <image001.png>Silvio Marino
> R&D Manager – Electronic Consultant
> Phone: +39 346 1066499
> Skype: live:marino.silvio
> Web: https://babos.it
> P
> - Before printing think about environment and costs
> - Prima di stampare pensa ai costi ambientali
>
>


Re: Trouble develop with CAN & MCP2515/2518

MARINO SILVIO <m.silvio@...>
 

Hi there,
attached the compilation log of the sample 'counter' tested as is. i just changed the original prj.conf file to :

CONFIG_POLL=y
CONFIG_CAN=y
CONFIG_SPI=y
CONFIG_CAN_MCP2515=y
CONFIG_CAN_INIT_PRIORITY=80
CONFIG_CAN_MAX_FILTER=5

CONFIG_SHELL=y
CONFIG_CAN_SHELL=y
CONFIG_DEVICE_SHELL=y

CONFIG_GPIO=y
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
CONFIG_STATS_SHELL=y
CONFIG_CAN_STATS=y

Best regards

Silvio



Il giorno 20/09/22, 07:58 "MARINO SILVIO" <m.silvio@...> ha scritto:


Sorry. Attached picture


Il giorno 20/09/22, 07:57 "MARINO SILVIO" <m.silvio@...> ha scritto:

Hello Andersen,
I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
Thank you if you want to help me.
Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.

Silvio Marino


Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:

Hi,

You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
Are you trying to use Zephyr SocketCAN?

Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
- Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
- Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can

./Brix
--
Henrik Brix Andersen

On 19 Sep 2022, at 09.22, m.silvio@... wrote:
>
> Hello,
> see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending
>
> there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
> Thank you very much.
> Silvio
>
>
>
> <image001.png>Silvio Marino
> R&D Manager – Electronic Consultant
> Phone: +39 346 1066499
> Skype: live:marino.silvio
> Web: https://babos.it
> P
> - Before printing think about environment and costs
> - Prima di stampare pensa ai costi ambientali
>
>


Re: Trouble develop with CAN & MCP2515/2518

MARINO SILVIO <m.silvio@...>
 

Sorry. Attached picture


Il giorno 20/09/22, 07:57 "MARINO SILVIO" <m.silvio@...> ha scritto:

Hello Andersen,
I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
Thank you if you want to help me.
Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.

Silvio Marino


Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:

Hi,

You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
Are you trying to use Zephyr SocketCAN?

Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
- Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
- Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can

./Brix
--
Henrik Brix Andersen

On 19 Sep 2022, at 09.22, m.silvio@... wrote:
>
> Hello,
> see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending
>
> there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
> Thank you very much.
> Silvio
>
>
>
> <image001.png>Silvio Marino
> R&D Manager – Electronic Consultant
> Phone: +39 346 1066499
> Skype: live:marino.silvio
> Web: https://babos.it
> P
> - Before printing think about environment and costs
> - Prima di stampare pensa ai costi ambientali
>
>


Re: Trouble develop with CAN & MCP2515/2518

MARINO SILVIO <m.silvio@...>
 

Hello Andersen,
I have been trying to make a mcp2515 expansion connected to a Nordic 52840 DK work for a week without success. I can't figure out how to set the CAN functions by connecting them to the mcp_2515 routines already entered in Zephyr. The attached one is the schematic of the connections between the CAN chip and the 52840DK board using the default SPI3 (spim). I simply have to transmit extended data and receive them using the RX and TX interrupt. I am fresh from Zephyr which offers a lot of possibilities but I have always worked in Keil uVision and I still struggle to switch between them.
Thank you if you want to help me.
Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can would be ideal for understanding the concepts.

Silvio Marino


Il giorno 19/09/22, 21:12 "Henrik Brix Andersen" <henrik@...> ha scritto:

Hi,

You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
Are you trying to use Zephyr SocketCAN?

Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
- Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
- Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can

./Brix
--
Henrik Brix Andersen

On 19 Sep 2022, at 09.22, m.silvio@... wrote:
>
> Hello,
> see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending
>
> there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
> Thank you very much.
> Silvio
>
>
>
> <image001.png>Silvio Marino
> R&D Manager – Electronic Consultant
> Phone: +39 346 1066499
> Skype: live:marino.silvio
> Web: https://babos.it
> P
> - Before printing think about environment and costs
> - Prima di stampare pensa ai costi ambientali
>
>


Output Image Padding #zephyr

Casey Shea
 

Is there a way to pad the end of a Zephyr application so that the overall size of the image stored in internal flash is divisible by 8?   I need this for post-process enciphering of the image. 


pointer to base of an iterable section #api

yshragai.firmware@...
 

Hi,
I would like to use the Polling API.
And, I would like to set up the array of k_poll_event objects as an iterable section, so that I can potentially scale it dynamically.
The only hitch I can see is that I need to be able to generate a pointer to the base of the iterable section, to provide as the events parameter to k_poll().
Is there a best (or at least good) method for doing this? (Short of creating a dummy k_poll_event object called "aaaaaaa" and pointing to it...)

Thanks!
 


Re: Trouble develop with CAN & MCP2515/2518

Henrik Brix Andersen
 

Hi,

You link contains the word “socket” as a search string but you are linking to the low-level CAN controller documentation.
Are you trying to use Zephyr SocketCAN?

Apart from all the CAN test suites under https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/can there are a couple of samples in-tree:
- Low-level CAN controller samples: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/can
- Zephyr SocketCAN sample: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/sockets/can

./Brix
--
Henrik Brix Andersen

On 19 Sep 2022, at 09.22, m.silvio@... wrote:

Hello,
see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending

there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?
Thank you very much.
Silvio



<image001.png>Silvio Marino
R&D Manager – Electronic Consultant
Phone: +39 346 1066499
Skype: live:marino.silvio
Web: https://babos.it
P
- Before printing think about environment and costs
- Prima di stampare pensa ai costi ambientali


Trouble develop with CAN & MCP2515/2518

m.silvio@babos.it <m.silvio@...>
 

Hello,
see at : https://docs.zephyrproject.org/latest/hardware/peripherals/canbus/controller.html?highlight=socket+can#sending

 

there is an inconsistency between the examples and the latest revision. They don't match, for example 'struct can_frame'. I can't get the mcp2515 chip to work with the spi3 on a nordic card and still have compilation errors. Could you send me an example of loop send data over CAN via mcp2515 with the latest revision? Or a relative link to watch?

Thank you very much.

Silvio

 

 

 

 signature_1826096540Silvio Marino

R&D Manager – Electronic Consultant

Phone: +39 346 1066499

Skype:  live:marino.silvio

Web: https://babos.it

P 

- Before printing think about environment and costs
- Prima di stampare pensa ai costi ambientali

 


Re: [Zephyr-devel] West Flash not supports JLinkScriptFile option for Jlink programming

Bolivar, Marti
 

This is not currently possible.

You are welcome to send a pull request adding the feature.

On Wed, Sep 14 2022, Srinivasan Tamilarasan via lists.zephyrproject.org wrote:
Hi All,
I need to use the custom Jlink script file, after flashing and resetting the target using -JLinkScriptFile command in jlink. This custom script is needed for our application to start executing.

When I use the zephyr west flash command to program our device, there is no option to add the JLinkScriptFile. Kindly help me to resolve the issue.

Regards,
Srinivasan



Using multiple pwm output channels on a single timer

Michael Federer
 

Hi all
If I understand the STM32F74xxx specs right, a timer provides provides several independent channels for PWM output signal generation (e.g. TIM1/TIM8 6 channels each).
My question is, how do I have to write my .overlay file to be able to control multiple channels of  a single timer?
So far I was able to control one pwm channel per timer with following configuration:

&timers1 {
status = "okay";
st,prescaler = < 0x2710 >;

pwm1: pwm {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&tim1_ch3_pe13>;
};
};

&timers2 {
status = "okay";
st,prescaler = < 0x2710 >;

pwm2: pwm {
status = "okay";
pinctrl-names = "default";
        pinctrl-0 = <&tim1_ch2_pe11>;
};
};

&timers3 {
status = "okay";
st,prescaler = < 0x2710 >;

pwm3: pwm {
status = "okay";
label="PWM_3";
pinctrl-names = "default";
pinctrl-0 = <&tim1_ch1_pe9>;
};
};

Adding multiple pwmx entries to a timersx entry didn't work. Probably I misunderstand the Zephyr Timer and PWM configuration concept.

I appreciate your help.


West Flash not supports JLinkScriptFile option for Jlink programming

Srinivasan Tamilarasan
 

Hi All,

I need to use the custom Jlink script file, after flashing and resetting the target using -JLinkScriptFile command in jlink. This custom script is needed for our application to start executing.

 

When I use the zephyr west flash command to program our device, there is no option to add the JLinkScriptFile. Kindly help me to resolve the issue.

 

Regards,

Srinivasan


Re: why can’t e thread be added to the run queue?

Justin Huang
 

Sure I will submit a ticket in GH and assign it to you.
Yes I am trying to bring up an SMP system while the IPI support is not yet in place, which will be enabled soon.
At the moment I am limited to use 2.7.0, which I agree is not ideal for bring up RISCV SMP. I hope we can move to a more decent release soon.

Cheers,
Justin

On Sep 9, 2022, 9:05 AM -0600, Andy Ross <andy@...>, wrote:
On 9/8/2022 7:29 PM, Justin Huang wrote:
> I think I am able to reproduce what I see with mainstream Zephyr, and below is what I do:
>
>     checkout HEAD of main (I was using dddb5dd6b0de9a8b8621b9ac695fd3fd980a33d6)
>     disable SCHED_IPI_SUPPORTED in the build (I just hacked arch/Kconfig and commented out “select SCHED_IPI_SUPPORTED if SMP”)
>     Run "west build -b qemu_riscv64_smp tests/kernel/smp && west build -t run"
>     Should see the ASSERT.
>
> It appears that the path of SMP test on RISCV without IPI support has not yet been tested, or maybe this configuration is invalid?
 
Ah, OK.  Indeed, that's a somewhat obscure feature, and it's not used in-tree currently I don't think (esp32 was for a long while, but they've moved off of SMP in the default configuration IIRC?).  The intent of that busy loop was to allow for bringup of SMP configurations before a working interprocessor interrupt was available.  Very few real/production systems can tolerate a spin loop in the idle thread.
 
But it looks like it's bitrotten and the default k_yield() path now doesn't work in idle?[1].  Can you submit a bug and assign it to me (@andyross on github)?
 
Also: I'm a little worried about your development setup.  To repeat: the circumstance where you'd want this feature corresponds to bringup of a new SMP platform where IPIs aren't ready.  If that's what you're doing, it would likely be better or everyone if you were working against the main branch and not a year-stale release.
 
Andy
 
[1] I'm going to place my bet that it was at or soon after this commit, which removed the last in-tree usage of k_yield() within the idle thread about a year ago: https://github.com/zephyrproject-rtos/zephyr/commit/851d14afc8941313a6f3faeb74f84ed73a33429a
 


Re: why can’t le thread be added to the run queue?

Andy Ross
 

On 9/8/2022 7:29 PM, Justin Huang wrote:
> I think I am able to reproduce what I see with mainstream Zephyr, and below is what I do:
>
>     checkout HEAD of main (I was using dddb5dd6b0de9a8b8621b9ac695fd3fd980a33d6)
>     disable SCHED_IPI_SUPPORTED in the build (I just hacked arch/Kconfig and commented out “select SCHED_IPI_SUPPORTED if SMP”)
>     Run "west build -b qemu_riscv64_smp tests/kernel/smp && west build -t run"
>     Should see the ASSERT.
>
> It appears that the path of SMP test on RISCV without IPI support has not yet been tested, or maybe this configuration is invalid?
 
Ah, OK.  Indeed, that's a somewhat obscure feature, and it's not used in-tree currently I don't think (esp32 was for a long while, but they've moved off of SMP in the default configuration IIRC?).  The intent of that busy loop was to allow for bringup of SMP configurations before a working interprocessor interrupt was available.  Very few real/production systems can tolerate a spin loop in the idle thread.
 
But it looks like it's bitrotten and the default k_yield() path now doesn't work in idle?[1].  Can you submit a bug and assign it to me (@andyross on github)?
 
Also: I'm a little worried about your development setup.  To repeat: the circumstance where you'd want this feature corresponds to bringup of a new SMP platform where IPIs aren't ready.  If that's what you're doing, it would likely be better or everyone if you were working against the main branch and not a year-stale release.
 
Andy
 
[1] I'm going to place my bet that it was at or soon after this commit, which removed the last in-tree usage of k_yield() within the idle thread about a year ago: https://github.com/zephyrproject-rtos/zephyr/commit/851d14afc8941313a6f3faeb74f84ed73a33429a
 


Re: why can’t e thread be added to the run queue?

Justin Huang
 

I think I am able to reproduce what I see with mainstream Zephyr, and below is what I do:
  • checkout HEAD of main (I was using dddb5dd6b0de9a8b8621b9ac695fd3fd980a33d6)
  • disable SCHED_IPI_SUPPORTED in the build (I just hacked arch/Kconfig and commented out “select SCHED_IPI_SUPPORTED if SMP”)
  • Run "west build -b qemu_riscv64_smp tests/kernel/smp && west build -t run"
  • Should see the ASSERT.
It appears that the path of SMP test on RISCV without IPI support has not yet been tested, or maybe this configuration is invalid?

I’d appreciate your input.

Cheers,
Justin

On Sep 8, 2022, 5:25 PM -0600, Justin Huang <justin.y.huang@...>, wrote:
Hi Andy,

Thank you for replying.
Sorry for the confusion. I incorrectly described the situation.
In this case it is the ‘idle thread’ that was to be swapped out, and fails the ASSERT at 
https://github.com/zephyrproject-rtos/zephyr/blob/3f826560aaf81a444018293bd6acce3c339fe150/kernel/sched.c#L177 
(I am using 2.7.0)

I’ve attached a stack trace hopefully to show a bit more details.
What I see in the stack is that when a core yields from the idle thread, and when the scheduler tries to put the idle thread back to the run queue (via z_priq_dumb_add()), we failed the ASSERT.

Could you share your thoughts?

Many thanks again,
Justin

On Sep 8, 2022, 7:44 AM -0600, Andy Ross <andy@...>, wrote:
The dummy threads don't "run", they're just thread structs used in place of a real thread.  They're essentially a trick used internally during CPU initialization[1] to be able to use the regular context switch to switch into the first thread without having a proper thread context to switch "out" of.  There should be protection against situations like you're seeing where the dummy thread is being presented to the scheduler as a real thread struct, thus that assertion.
 
Basically something has broken your scheduler state somewhere.  Is your exerciser something simple you can show against upstream Zephyr?  If so, it's probably worth filing an issue in github and tagging or assigning @andyross.  If not, can you detail what you're doing so we can try to guess what's going wrong?
 
Andy

[1] And in one legacy IPC primitive, to be able to have something in a wait queue record that isn't an actual thread.  One of these days I hope to fix that, it complicates things in a bunch of areas.  But that's unlikely to be your problem unless you're using (and probably modifying the implementation of) kernel mailboxes.


Re: why can’t le thread be added to the run queue?

Justin Huang
 

Hi Andy,

Thank you for replying.
Sorry for the confusion. I incorrectly described the situation.
In this case it is the ‘idle thread’ that was to be swapped out, and fails the ASSERT at 
https://github.com/zephyrproject-rtos/zephyr/blob/3f826560aaf81a444018293bd6acce3c339fe150/kernel/sched.c#L177 
(I am using 2.7.0)

I’ve attached a stack trace hopefully to show a bit more details.
What I see in the stack is that when a core yields from the idle thread, and when the scheduler tries to put the idle thread back to the run queue (via z_priq_dumb_add()), we failed the ASSERT.

Could you share your thoughts?

Many thanks again,
Justin

On Sep 8, 2022, 7:44 AM -0600, Andy Ross <andy@...>, wrote:
The dummy threads don't "run", they're just thread structs used in place of a real thread.  They're essentially a trick used internally during CPU initialization[1] to be able to use the regular context switch to switch into the first thread without having a proper thread context to switch "out" of.  There should be protection against situations like you're seeing where the dummy thread is being presented to the scheduler as a real thread struct, thus that assertion.
 
Basically something has broken your scheduler state somewhere.  Is your exerciser something simple you can show against upstream Zephyr?  If so, it's probably worth filing an issue in github and tagging or assigning @andyross.  If not, can you detail what you're doing so we can try to guess what's going wrong?
 
Andy

[1] And in one legacy IPC primitive, to be able to have something in a wait queue record that isn't an actual thread.  One of these days I hope to fix that, it complicates things in a bunch of areas.  But that's unlikely to be your problem unless you're using (and probably modifying the implementation of) kernel mailboxes.

1 - 20 of 3076