This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/AM3357: Ethernet/IP Timers

Part Number: AM3357
Other Parts Discussed in Thread: SYSBIOS, AMIC110

Tool/software: TI-RTOS

I'm trying to add timers in the Ethernet/IP app v01.00.03.04 and I'm facing some difficulties.

For the older EIP app I found the documentation about the used timers: http://processors.wiki.ti.com/index.php/ICSS_EIP_Adapter_Developer_Guide

It seems Timer4 and 5 were used.

For APP v01.00.03.04 the only info I know is from: 
 

NOTE 7
The AM335x and AMIC11x application uses DMTimer4 as the clock source for the SYSBIOS Ticks (Refer to cfg file for details). The DMTimer module should be enabled for the application to load properly with the change. This needs to be done in the GEL file. Make the following changes in GEL File to enable DMTimer4

Add the line inside hotmenu AM3359_ICE_Initialization()
    WR_MEM_32(CM_PER_TIMER4_CLKCTRL, PRCM_MODULEMODE_ENABLE);
Add the defines in the GEL File
    #define CM_PER_TIMER4_CLKCTRL (PRCM_BASE_ADDR + 0x88)
    #define PRCM_MODULEMODE_ENABLE (2U)

So SYSBIOS uses Timer4.

I've found that the EIP app starts the Timer5 (configuring its CM_PER register and clock source) but I can't find where it is used.

But when trying to use timer5 (with Timer_create() function) it crashes (don't know why). Maybe someone uses it actually?

I've also found that several clocks are created in the app, and I believe those clocks end up in timers, but I don't know how to check that (I tried looking in ROV but I didn't found what timer was used for each created clock).

If I'm not wrong, this SoC has timers from 2 to 7 with IDs from 0 to 5 (Timer5 has ID 3).

With Timers 6 and 7, for example, I can create a timer object (with Timer_create() function, enabling its CM_PER before) and everything works fine.

I tried also to move SYSBIOS timer from Timer4 to Timer2 (changing Clock.timerID = 0; in the .cfg) and everything seems to work fine, there is some requirement then for being in Timer4?

Could you give me some advice? I would like to know what timers are used and if they can be (easily) moved or not.

Many thanks!

Best regards,

Jordi

  • Hi Jordi, just FYI we updated DMTimer4/5 information As a summary DMTimer4/5 were used in our previous Ethernet/IP based on Industrial SDK for beacon timeouts. New PRU-ICSS Ethernet/IP model (on top of Processor SDK) uses WD for DLR.

    Currently, for AMIC110/AM335x we are using DMTimer4 as system tick. I don't think is any issues if you change it to DMTimer2. Just be careful to change it in all the places, including gel file (and later in bootloader).

    For other tasks, you should be able to use any other DMTimer. For creating timers can use Timer.create() from *.cfg or Timer_create() from runtime.  A small detail, please check you are using #include <ti/sysbios/timers/dmtimer/Timer.h> instead of #include <ti/sysbios/hal/Timer.h>. Based on experience, I have noticed some structs and DMTimers fields doesn't exist on plain /hal/Timer.h...

    FYI, we have some SYSBIOS training series. It might be to basic for you, but anyhow, it might help other users. One of the modules is for Timers and Clocks.

    Please let us know if you face still face any issue creating/using timers.

    thank you,

    Paula

  • Hi Paula,

    Finally I found why I wasn't able to use Timer5, it was being used for the timeSync lib (function TimeSync_isrAndTaskInit()).

    Then, as I understand, Ethernet/IP app uses:

    • dmTimer4 for system ticks
    • dmTimer5 for timeSync lib
    • WD for DLR

    I'm not able to find the new doc you just updated, when I enter to the link I see the same doc for the old version of the EIP app.

    Could you indicate me where it is?

    Many thanks!

    Jordi

  • Hi Jordi, I will check about Timers in timeSync lib and come back to you. A question do you need PTP/timesync lib? if not, you can take it off..

    About documentation, it is the same above link. We just corrected text information in few places. If you don't see any difference, maybe you would need to refresh your Internet browser cache.

    thank you,
    Paula