Post Go back to editing

BF534 SSL sets timer pin to output not input?

Hi,

  I'm using a BF534 with VisualDSP 5.0 update 7.

In the System Services Library adi_ports_bf534.c there's a routine called ad_ports_EnableTimer()

and it gets called down the chain from my call to adi_tmr_GPGroupEnable().

I have set up three timers as part of initialising the PPI for an LCD display. I found my hardware

would reset when this routine was called.

It seems that although I was setting up the timers to run from PPI_CLK as an input, the routine

was setting PPI_CLK as an output and causing a current drain to dip the 3.3v and trip the MAX809

PSU watchdog.

Can anyone re-assure me that the following code is wrong: (in ad_ports_EnableTimer, line 589)

            // CASE ( TMR_CLK pin)
            case ADI_PORTS_DIR_TMR_CLK:
                // Set mask for TMRCLK pin
                port_masks[ADI_PORTS_GET_PORT(ADI_PORTS_TIMER_TMR_CLK)] |= ADI_PORTS_GET_PIN_MASK(ADI_PORTS_TIMER_TMR_CLK);
                // Set bits in PORTFIO_DIR and PORTFIO_INEN registers to enable TMRCLK pin for input
                // (I need to check whether this is necessary)
                *pPORTFIO_DIR  |= ADI_PORTS_GET_PIN_MASK(ADI_PORTS_TIMER_TMR_CLK);
                *pPORTFIO_INEN |= ADI_PORTS_GET_PIN_MASK(ADI_PORTS_TIMER_TMR_CLK);
                break;

I've changed line 589 to :


                *pPORTFIO_DIR  &= ~(ADI_PORTS_GET_PIN_MASK(ADI_PORTS_TIMER_TMR_CLK));

Since the comments suggest that it is trying to make the port pin an input.

Parents Reply Children
No Data