Other Parts Discussed in Thread: MSP430FR2355, MSP430FR2433
Hello, first off sorry for the low level of the question. I want to test using an oscilloscope if my MSP430FR2533 is able to send a bit via UART. I therefore hooked up the pins 1.6 and 1.7 (acording to https://www.ti.com/lit/ug/slau680/slau680.pdf?ts=1664383334483 page 26 and https://www.ti.com/lit/ds/slasec4d/slasec4d.pdf?ts=1664451907348 page 76) to the oscilloscope and wrote this code:
#include <msp430.h>
#include <driverlib.h>
#include "eusci_a_uart.h"
char test = 0x42;
volatile uint32_t i;
void main(void) {
// Stop watch dog timer
WDT_A_hold(WDT_A_BASE);
PMM_unlockLPM5();
UCA0CTLW0 |= UCSWRST;
// GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P1, GPIO_PIN7,
// GPIO_SECONDARY_MODULE_FUNCTION);
// GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1, GPIO_PIN6,
//GPIO_SECONDARY_MODULE_FUNCTION);
EUSCI_A_UART_initParam eUSCI_initParam = {
EUSCI_A_UART_CLOCKSOURCE_SMCLK, // selectClockSource
6, // clockPrescalar UCBRx
8, // firstModReg UCBRFx
17, // secondModReg UCBRSx
EUSCI_A_UART_NO_PARITY, EUSCI_A_UART_MSB_FIRST,
EUSCI_A_UART_ONE_STOP_BIT, EUSCI_A_UART_AUTOMATIC_BAUDRATE_DETECTION_MODE,
EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION };
EUSCI_A_UART_init(EUSCI_A0_BASE, &eUSCI_initParam);
EUSCI_A_UART_enable(EUSCI_A0_BASE);
EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
EUSCI_A_UART_RECEIVE_INTERRUPT);
while(1)
{
EUSCI_A_UART_transmitData(EUSCI_A0_BASE, test);
for (i = 0; i<100000000; ++i);
}
}
However, I cant read any signal with the oscilloscope. Is there anythingwrong with the init() or the enable function?
Once again, I am sorry for such a stupid question, but i wasnt really able to find what i really need after a long search on the internet.
Thank you, Julius