sicrisembay / CANopenNode_ESP32

CANopenNode device support for Espressif ESP32
9 stars 1 forks source link

TPDO Error: Object Dictionary entry 0x1a0002 #2

Open ruziev-dev opened 1 week ago

ruziev-dev commented 1 week ago

Hi, I have faced with TPDO problem.

MCU: ESP32-C6

I`m trying to send TPDO like in a video example here (https://www.youtube.com/watch?v=R-r5qIOTjOo)

image image image image

But there is some error in object Dictionary when CO_CANopenInitPDO is calling.

 err = CO_CANopenInitPDO(CO, CO->em, OD, activeNodeId, &errInfo);
        if (err != CO_ERROR_NO)
        {
            if (err == CO_ERROR_OD_PARAMETERS)
            {
                ESP_LOGE(TAG, "[CO_CANopenInitPDO]: Object Dictionary entry 0x%lx", errInfo);
            }
            else
            {
                ESP_LOGE(TAG, "PDO initialization failed: %d", err);
            }
        }
I (731) CO_ESP32: Initializing
I (735) CO_ESP32: main task running.
I (739) CO_ESP32: Allocated 6640 bytes for CANopen objects
I (745) CO_ESP32: CANopenNode - Reset communication
I (751) gpio: GPIO[10]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (760) gpio: GPIO[11]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (770) CO_driver: Driver installed
I (774) CO_driver: Driver started
I (778) CO_driver: Creating Tx Task
I (782) CO_driver: tx task running
I (786) CO_driver: Creating Rx Task
I (790) CO_driver: rx task running
E (795) CO_ESP32: [CO_CANopenInitPDO]: Object Dictionary entry 0x1a0002
I (801) CO_ESP32: creating periodic task
I (806) CO_ESP32: Periodic task running
I (811) CO_ESP32: periodic task created
I (815) CO_ESP32: CANopenNode is running

May be somebody could help me It's an .xpd file but for an opportunity to upload it to github I added ".txt" in end E_test.xpd.txt

sicrisembay commented 1 week ago

Can you help me on doing the following:

  1. please check if the issue is still reproducible when using format xdd and not xpd?
  2. I'm using an older OD editor v4.1-2-gff637a7. Can you help me check if issue is reproducible using this version?

I just want to eliminate that this has nothing to do with the OD generation.

regards, Sicris

ruziev-dev commented 2 days ago

@sicrisembay thank you for answer!

I found error in RPDO mapping and solve it. But now I see another problem:

TPDO messages is constantly zero. I'm changing variable from OD:

 OD_RAM.x6000_test_1 = OD_RAM.x6000_test_1 + 5;
 printf("OD_RAM.x6000_test_1: 0x%lX\n", OD_RAM.x6000_test_1);

and see result in logs:

OD_RAM.x6000_test_1: 0x6
OD_RAM.x6000_test_1: 0xB
OD_RAM.x6000_test_1: 0x10
OD_RAM.x6000_test_1: 0x15
OD_RAM.x6000_test_1: 0x1A

This variable is mapped to TPDO

image

But PDO is constantly zero

image

What problem it can be?