This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430G2553:Lora E 32

Guru**** 2473260 points
Other Parts Discussed in Thread: MSP430G2553

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1321955/msp430g2553-lora-e-32

器件型号:MSP430G2553

大家好! 早上好、我需要有关 MSP430G2553和 E32 LoRa 模块的帮助。 我有下面的代码、但我不确定它为什么不起作用。 有人可以帮我提一些建议吗? 。 手册链接: www.manualslib.com/.../Ebyte-E32-900t20d.html

#包含

void initUART (void){
UCA0CTL1 |= UCSSEL_2//使用 SMCLK
UCA0BR0 = 104// Configuração para 9600 baud com 1MHz SMCLK
UCA0BR1=0
UCA0MCTL = UCBRS0// Modulação
UCA0CTL1 &=~UCSWRST// Initizia a máquina de Estado USCI
IE2 |= UCA0RXIE// HABILA interrupção POR recepção

void initMSP430 (void){
WDTCTL = WDTPW + WDTHOLD// Para o watchdog timer
BCSCTL1 = CALBC1_1MHZ//可配置 a o DCO 参数1 MHz
DCOCTL = CALDCO_1MHz
P1SEL = BIT1 + BIT2// P1.1 = RXD、P1.2=TXD
P1SEL2 = BIT1 + BIT2// P1.1 = RXD、P1.2=TXD
inituart()
__ bis_SR_register (GIE);// Habilitya interrupções globais

int main (void){
initMSP430 ();

char msg[10]=0xFF、0xFF、0x04'H'、'E''L'、'L'、 "O"};

while (1)
{

for (int i = 0i < sizeof (msg);i++){
while ((IFG2 & UCA0TXIFG));
UCA0TXBUF = msg[i]

__ delay_cycles (1200);


  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您是否在它上面放置了示波器以查看您发送的内容?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    IE2  |=  UCA0RXIE // Habilita interrupção POR recepção

    这将启用 Rx 中断、但我看不到它的 ISR。 如果模块确实有响应、您将转向 FaultISR (或某些类似名称)并永久旋转。

    我建议你删除这一行,至少现在。