This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USART Driver used as SPI

Hi,

I'd like to use USART0 of my ATSAME70Q21 as SPI master but It does not work.

I'm using CMSIS driver (Keil). If I use UASRT as UART it works well.

The setting for SPI master is this:

case USART_0:
   Usart[Ch].pDrv->Initialize( Usart0Callback );
   Usart[Ch].pDrv->PowerControl( ARM_POWER_FULL );
   Usart[Ch].pDrv->Control( ARM_USART_MODE_SYNCHRONOUS_MASTER | ARM_USART_CPOL0 | ARM_USART_CPHA0 | ARM_USART_DATA_BITS_8, BaudRate );

   Usart[Ch].pDrv->Control( ARM_USART_SET_DEFAULT_TX_VALUE, 0xFFFF );

   Usart[Ch].pDrv->Control( ARM_USART_CONTROL_TX, 1 );
   Usart[Ch].pDrv->Control( ARM_USART_CONTROL_RX, 1 );
   break;

  while(1)

     Usart[Ch].pDrv->Send( pData, Size );

Best regards

LB

Parents Reply Children