Skip to content
Snippets Groups Projects
Commit 975a0cd5 authored by Edward Longman's avatar Edward Longman
Browse files

Add reset of SPI port

parent e0d0014f
No related branches found
No related tags found
No related merge requests found
#include "msp430fr5994.h"
#include "stdio.h"
#include "lib/radio_drv/hal_spi_rf.h"
#include "lib/radio_drv/hal_types.h"
#include "lib/hal_mcu/hal_mcu_fr5.h"
#include "lib/uart_drv/uart_drv.h"
......@@ -64,6 +65,17 @@ void main (void)
P3DIR |= BIT4;
P3SEL0 &= ~BIT4;
P3SEL1 &= ~BIT4;
//Setup SPI
/* Keep peripheral in reset state*/
UCB1CTLW1 |= UCSWRST;
UCB1CTL1 &= ~(UCSSEL_3);
//Reset all config
UCB1CTLW0 = ~(UCCKPH + UCCKPL + UC7BIT + UCMSB +
UCMST + UCMODE_3 + UCSYNC);
/* Release for operation */
UCB1CTL1 &= ~UCSWRST;
__enable_interrupt();
/* Infinite loop with a 1 second timer */
while(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment