Ignore:
Timestamp:
Jul 16, 2015, 12:14:32 PM (5 years ago)
Author:
Premysl Houdek <kom541000@…>
Branches:
4.11, master
Children:
7e14385
Parents:
602e395
git-author:
Premysl Houdek <kom541000@…> (07/16/15 12:14:32)
git-committer:
Joel Sherrill <joel.sherrill@…> (07/16/15 18:15:52)
Message:

bsp/tms570: source changes reflecting new headers.

Signed-off-by: Premysl Houdek <kom541000@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/tms570/clock/clock.c

    r602e395 r069560a  
    3737static uint32_t tms570_rti_get_timecount(struct timecounter *tc)
    3838{
    39   return TMS570_RTI.RTIFRC0;
     39  return TMS570_RTI.CNT[0].FRCx;
    4040}
    4141
     
    8484
    8585  /* Hardware specific initialize */
    86   TMS570_RTI.RTIGCTRL = 0;
    87   TMS570_RTI.RTICPUC0 = tc_prescaler - 1;
    88   TMS570_RTI.RTITBCTRL = 2;
    89   TMS570_RTI.RTICAPCTRL = 0;
    90   TMS570_RTI.RTICOMPCTRL = 0;
     86  TMS570_RTI.GCTRL = 0;
     87  TMS570_RTI.CNT[0].CPUCx = tc_prescaler - 1;
     88  TMS570_RTI.TBCTRL = 2;
     89  TMS570_RTI.CAPCTRL = 0;
     90  TMS570_RTI.COMPCTRL = 0;
    9191  /* set counter to zero */
    92   TMS570_RTI.RTIUC0 = 0;
    93   TMS570_RTI.RTIFRC0 = 0;
     92  TMS570_RTI.CNT[0].UCx = 0;
     93  TMS570_RTI.CNT[0].FRCx = 0;
    9494  /* clear interrupts*/
    95   TMS570_RTI.RTICLEARINTENA = 0x00070f0f;
    96   TMS570_RTI.RTIINTFLAG = 0x0007000f;
     95  TMS570_RTI.CLEARINTENA = 0x00070f0f;
     96  TMS570_RTI.INTFLAG = 0x0007000f;
    9797  /* set timer */
    98   TMS570_RTI.RTICOMP0 = TMS570_RTI.RTIFRC0 + tc_increments_per_tick;
    99   TMS570_RTI.RTICOMP0CLR = TMS570_RTI.RTICOMP0 + tc_increments_per_tick / 2;
    100   TMS570_RTI.RTIUDCP0 = tc_increments_per_tick;
     98  TMS570_RTI.CMP[0].COMPx = TMS570_RTI.CNT[0].FRCx + tc_increments_per_tick;
     99  TMS570_RTI.COMP0CLR = TMS570_RTI.CMP[0].COMPx + tc_increments_per_tick / 2;
     100  TMS570_RTI.CMP[0].UDCPx = tc_increments_per_tick;
    101101  /* enable interupt */
    102   TMS570_RTI.RTISETINTENA = 0x1;
     102  TMS570_RTI.SETINTENA = 0x1;
    103103  /* enable timer */
    104   TMS570_RTI.RTIGCTRL = 1;
     104  TMS570_RTI.GCTRL = 1;
    105105  /* set timecounter */
    106106  tms570_rti_tc.tc_get_timecount = tms570_rti_get_timecount;
     
    118118static void tms570_clock_driver_support_at_tick( void )
    119119{
    120   TMS570_RTI.RTIINTFLAG = 0x00000001;
     120  TMS570_RTI.INTFLAG = 0x00000001;
    121121}
    122122
     
    157157{
    158158  /* turn off the timer interrupts */
    159   TMS570_RTI.RTICLEARINTENA = 0x20000;
     159  TMS570_RTI.CLEARINTENA = 0x20000;
    160160}
    161161
Note: See TracChangeset for help on using the changeset viewer.