Device Tree overlay ipc icmsg sample

Hello everyone.

I was trying to integrate the ipc_service sample in my application. It was working all fine and I was able to set up and link the endpoint in my code. I then tried to run a clean build, and I don't know why everything broke: when I try to execute ipc_service_register_endpoint, this happens, the board resets and keeps doing it forever.

 

Thinking that is a matter of memory position, I found out that my compiled devicetree output for the application core has a reserved-memory node like this

reserved-memory {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
        sram0_image: image@20000000 {
                reg = <0x20000000 DT_SIZE_K(448)>;
        };

        sram0_s: image_s@20000000 {
                reg = <0x20000000 0x40000>;
        };

        sram0_ns: image_ns@20040000 {
                reg = <0x20040000 0x30000>;
        };

        sram_rx: memory@20078000 {
                reg = <0x20078000 0x8000>;
        };

};

Instead of 

reserved-memory {
        sram_tx: memory@20070000 {
                reg = <0x20070000 0x8000>;
        };

        sram_rx: memory@20078000 {
                reg = <0x20078000 0x8000>;
        };

};

Network core side instead, the devicetree seems ok, but I still encounter the error at endpoint registration time.

I am quite lost and I don't really know how to proceed, since this problem appeared point-blank when I tried to build from zero once again.

Parents
  • Yes Vidar, it was clear enough that the problem was the __WFE().

    I have no idea what the ERR_PARAM can be since I only observe it if I try to send messages when the ESB_EVENT_RX_RECEIVED triggers. You can replicate the problem yourself if you send in the ESB_EVENT_TX_SUCCESS case of the ESB event handler (make variable "a" global first). I can only suspect that there is a problem with the endpoint, what do you think?

    If I send the same structure in the while loop inside the main, I can correctly observe my data structure in the application core. 

    The problem is that this way, I don't know why, I can only send data from one (occasionally 2) node out of 3 nodes of my network: it seems that the sending operation in the while is done "slower" with respect the ESB_RX callback.

    In the application core, everything works fine as long as I use a small k_msleep (I'm using 5 msec): If I keep the while doing its stuff without sleeping (e.g: printing something), I no longer receive any message.

    I think that I'm stuck understanding priorities in ISRs and I just need to figure when operations are done with respect to others.

Reply
  • Yes Vidar, it was clear enough that the problem was the __WFE().

    I have no idea what the ERR_PARAM can be since I only observe it if I try to send messages when the ESB_EVENT_RX_RECEIVED triggers. You can replicate the problem yourself if you send in the ESB_EVENT_TX_SUCCESS case of the ESB event handler (make variable "a" global first). I can only suspect that there is a problem with the endpoint, what do you think?

    If I send the same structure in the while loop inside the main, I can correctly observe my data structure in the application core. 

    The problem is that this way, I don't know why, I can only send data from one (occasionally 2) node out of 3 nodes of my network: it seems that the sending operation in the while is done "slower" with respect the ESB_RX callback.

    In the application core, everything works fine as long as I use a small k_msleep (I'm using 5 msec): If I keep the while doing its stuff without sleeping (e.g: printing something), I no longer receive any message.

    I think that I'm stuck understanding priorities in ISRs and I just need to figure when operations are done with respect to others.

Children
No Data
Related