AT91SAM3U4E clock frequency

Hello,
i am using the at91Sam3U4E demo board, and the relative FreeRTOS port for IAR Workbench.
I noticed that from the pin of the main clock, i can’t se any wave with my oscilloscope.
I expected to look something like a square wave, but i can see just a continuous signal.
I gave a look at the LowLevelinit() function, that i haven’t changed, and there i found the settings for the clock.
Maybe there is something i have to change to get the signal working ? Thank you in advance,
Vito Vecchio

AT91SAM3U4E clock frequency

Is the problem that the clock is not feeding the MCU, and therefore you cannot run the program, or just that the clock is not visible on an external pin? Regards.

AT91SAM3U4E clock frequency

I have uart  and leds running fine, i was trying to develop a iso7816 driver on usart1, then trying signals with oscilloscope i noticed i did not receive the clock signal, i mean it was a flat signal, so i try to look directly on the pin 24 of the cortex m3 (the clock pin), and it’s always a flat signal. I don’t know if it’s normal or i should see the clock wave. Thanks in advance,
Vito Vecchio

AT91SAM3U4E clock frequency

sorry, to be more detailed, the pin is the PA24

AT91SAM3U4E clock frequency

Sorry – that is very chip specific and not FreeRTOS related.  Without looking at your code and getting the chip user guide and data sheet out myself I would have no idea what should be on that pin when. Regards.

AT91SAM3U4E clock frequency

Hello,
i post my functions here, this is my usart1 setting code: #define USART_MODE_ISO7816_T0  (AT91C_US_USMODE_ISO7816_0 | AT91C_US_CLKS_EXT | AT91C_US_CHRL_8_BITS | AT91C_US_PAR_EVEN | AT91C_US_NBSTOP_2_BIT | AT91C_US_CKLO) #define BOARD_PIN_USART_RXD        PIN_USART1_RXD
#define BOARD_PIN_USART_TXD        PIN_USART1_TXD
#define BOARD_PIN_USART_CTS        PIN_USART1_CTS
#define BOARD_PIN_USART_RTS        PIN_USART1_RTS
#define BOARD_USART_BASE           AT91C_BASE_US1
#define BOARD_ID_USART             AT91C_ID_US1 #define BOARD_ID_SMART             AT91C_ID_US1 #define PINS_ISO7816_SMART          PIN_USART1_TXD, PIN_USART1_SCK, PIN_ISO7816_RST_SMART, PIN_SMART_CONF_A, PIN_SMART_CONF_B xComPortHandle xSmartPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
xComPortHandle xReturn = ( ( xComPortHandle ) 2 );
extern void ( vUART_ISR )( void );
const Pin xUSART_Pins = { PINS_ISO7816_SMART }; /* Create the queues used to hold Rx and Tx characters. */
xRxedISOChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xTxedISOChars = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) ); /* If the queues were created correctly then setup the serial port
hardware. */
if( ( xRxedISOChars != serINVALID_QUEUE ) && ( xTxedISOChars != serINVALID_QUEUE ) )
{
portENTER_CRITICAL();
{
/* Enable the peripheral clock in the PMC. */
PMC_EnablePeripheral( BOARD_ID_SMART ); /* Configure the USART. */
USART_Configure( BOARD_SMART_BASE, USART_MODE_ISO7816_T0, ulWantedBaud, configCPU_CLOCK_HZ ); /* Configure the interrupt.  Note the pre-emption priority is set
in bits  of the priority value passed as the parameter. */
IRQ_ConfigureIT( BOARD_ID_SMART, ( configMAX_SYSCALL_INTERRUPT_PRIORITY << 8 ), USART1_IrqHandler );
IRQ_EnableIT( BOARD_ID_SMART ); /* Configure IO for USART use. */
PIO_Configure( xUSART_Pins, PIO_LISTSIZE( xUSART_Pins ) );                                    
}
portEXIT_CRITICAL();
}
else
{
xReturn = ( xComPortHandle ) 0;
} /* This demo file only supports a single port but we have to return
something to comply with the standard demo header file. */
return xReturn;
} where USART_Configure is: void USART_Configure(AT91S_USART *usart,
                            unsigned int mode,
                            unsigned int baudrate,
                            unsigned int masterClock)
{
    // Reset and disable receiver & transmitter
    usart->US_CR = AT91C_US_RSTRX | AT91C_US_RSTTX
                   | AT91C_US_RXDIS | AT91C_US_TXDIS;     // Configure mode
    usart->US_MR = mode;       usart->US_IDR = -1;
      usart->US_FIDI = 372;
    // Configure baudrate
   // Asynchronous, no oversampling
if(mode==USART_MODE_ISO7816_T0){
        usart->US_BRGR = (masterClock / 3571200);
    }    USART_SetTransmitterEnabled(usart, 1);
    USART_SetReceiverEnabled(usart, 1);
 
  
     // TODO other modes
} where i didn’t report the macro, is used the standard value as freeRTOS did.
It could be something missing in the USART_Configure ? So i expected to find the clock signal on the PA24, since i enabled it with PMC_EnablePeripheal(), but can’t see anything. Thanks in advance for the reply,
Vito Vecchio