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.

Why timer4 settings were impacted by slaveloaer/firmware_loader?

Other Parts Discussed in Thread: SYSBIOS

Hi experts,

We are using ezsdk_dm816x-evm_5_05_01_04, when we download C674x binary ("*.xe764") with slaveloader/firmware_loader, we found timer4 registers were impacted by slaveloader/firmware_loader.

We config TIM4_OUT/GP0[28] pin as TIM4_OUT to generate PWM signal, but we found that timer4 registers were flushed by slaveloaer/firmware_loader, the PWM signal was pulldown to low level once slaveloaer/firmware_loader is invoked, but the PINCTRL203 Register (0x48140B28) was not impacted.

 

Thanks and Regards,

Jed

  • DMTIMER 4 is used by sysbios as the kernel scheduler timer for c674 core. It should not be used for any other purpose as it will prevent c674 from running correctly.

  • Hi,

    Is the scheduler timer which provides system tick?

    And how could we change the sysbios scheduler timer from timer4 to the other timers?

     

    Regards,

    Jed

  • Just to add, that EZSDK 5.05.01.04 is using PSP04.04.00.01:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_04.04.00.01_Feature_Performance_Guide#Module.2FSubsystem_Usage

    From the wiki page above:

    Timer1 - system timer, Used by U-Boot for timekeeping purposes

    Timer2 - used by Linux

    Timer3 - not used, but not pinned out (check DM816x datasheet), can not be used for PWM

    Timer4 - used by sysbios

    Timer5/6/7 - not used, pinned out (check DM816x datasheet), can be used for PWM

    BR,

    Pavel

  • By system tick if you referring to Clock_getTicks then you are right.It is the same scheduler timer which causes a 1ms periodic timer interrupt which increments the Clock.

    It is strongly recommended you don't change default BIOS setting.If that is not possible and you are okay to experiment and debug you can try the following:

    Change:

    D:\ti_software\bios\bios_6_33_05_46\packages\ti\sysbios\timers\dmtimer\Timer.xs

     

    Change

                "TMS320TI816X": {
                    timerSupportDelegate : "ti.sysbios.family.c64p.ti81xx.TimerSupport",
                    timer: [
    /* used by linux
                        {
                            name: "GPTimer0",
                            baseAddr: 0x0802C000,
                            intNum:  4,
                            eventId: 48,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
                        {
                            name: "GPTimer1",
                            baseAddr: 0x0802E000,
                            intNum:  5,
                            eventId: 49,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
                        {
                            name: "GPTimer2",
                            baseAddr: 0x08040000,
                            intNum:  6,
                            eventId: 50,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
    used by linux */
    /* SDOCM00084584 removed GPTimers 3 & 7
                        {
                            name: "GPTimer3",
                            baseAddr: 0x08042000,
                            intNum:  14,
                            eventId: 51,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
    */
                        {
                            name: "GPTimer4",
                            baseAddr: 0x08044000,
                            intNum:  15,
                            eventId: 52,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },

    to

                "TMS320TI816X": {
                    timerSupportDelegate : "ti.sysbios.family.c64p.ti81xx.TimerSupport",
                    timer: [
    /* used by linux
                        {
                            name: "GPTimer0",
                            baseAddr: 0x0802C000,
                            intNum:  4,
                            eventId: 48,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
                        {
                            name: "GPTimer1",
                            baseAddr: 0x0802E000,
                            intNum:  5,
                            eventId: 49,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
                        {
                            name: "GPTimer2",
                            baseAddr: 0x08040000,
                            intNum:  6,
                            eventId: 50,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
    used by linux */
    /* SDOCM00084584 removed GPTimers 3 & 7
                        {
                            name: "GPTimer3",
                            baseAddr: 0x08042000,
                            intNum:  14,
                            eventId: 51,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },

                       TIMER 4 used by app comment out
                        {
                            name: "GPTimer4",
                            baseAddr: 0x08044000,
                            intNum:  15,
                            eventId: 52,
                            intFreq: {
                                lo: 32768,
                                hi: 0,
                            },
                        },
    */

     After this you have to rebuild BIOS for c674. If you rebuild the c674 firmware it should get rebuilt automatically.

     

    After this you will have to modify syslink to configure the dmtimer 5 (or whatever) before the c674 firmware is loaded. Currently dmtimer 4 will be configured and you can use that as reference.

    You could also post in BIOS forum for expert input from BIOS team.

  • OK, I see.

    Thank you all.

     

    Best Regards,

    Jed

  • Pavel Botev said:

    Timer3 - not used, but not pinned out (check DM816x datasheet), can not be used for PWM

    Timer5/6/7 - not used, pinned out (check DM816x datasheet), can be used for PWM

    hi Pavel,

        Why timer3 can't be used for PWM? I didn't find the description in the website.

     

  • Jack1234 said:
    Why timer3 can't be used for PWM? I didn't find the description in the website.

    Jack,

    Timer3 is not pinnout, does not have pins, does not have I/O capabilities.

    DM816x TRM:

    21.1.4 GP Timer External System Interface

    Some GP timers can send or receive stimulus to/from the external (off-chip) system. In the device, however, only certain timers are configured to output a PWM pulse or receive an external event signal used as a trigger to capture the current timer count. See the device-specific Data Manual details on which timers have IO capabilities.

    DM816x datasheet:

    8.19 Timers

    The device has seven 32-bit general-purpose (GP) timers that have the following features:
    • Timers 1-3 are for software use and do not have an external connection

    Below is example of using the Timer4 for PWM, but without using the DSP firmware (in this case Timer4 is not reserved for sysbios):

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/246727/869758.aspx

    Regards,

    Pavel