2025-01-30 02:25 AM - edited 2025-02-03 06:04 AM
Hi everyone,
I'm at the start to build up my transceiver based on the STM32WL33 with the Nucleo-board NUCLEO-WL33CC1 and the Mainboard MB1801. I want to use the IOC in the Cube IDE.
I struggle with getting the received Data to my output pin so that I can verify the quality with an oscilloscope.
-New IOC Project
-Clear all Human Interface Ports
-Enable High Speed Clock (HSE)
-Low Speed Clock (LSE) -> Crystal/Ceramic Resonator
-Connectivity-> MRSUBG -> Activated; Receive Clock control (checked); Receive Data control (checked)
lFrequency: 868000000
xModulation Select MOD_2FSK
lDatarate 4800
lFreqDev = 10000
lBandwith=25000
---> everything else is standart (Basic Packet, Preamble=0, Postamble=0, No Crc, No Coding, Byte Legth = 1, Sync Present Tried both)
-Pin PA8->MRSUBG_RX_SEQUENCA
>>>>> Generate Code <<<<<
Add
__HAL_MRSUBG_SET_RX_MODE(RX_NORMAL)
__HAL_MRSUBG_STROBE_CMD(CMD_RX);
after MX_MRSUBG_Init();
>>>>>> Compile and start Debugger <<<<<<<<<<< (SB30 soldered for using normal Debugger)
I can't get any data output on
CN3/Pin7 (=PA10=MRSUBG_RX_DATA) (also removed SB28 so no Boot0 control von Debugger)
CN4/Pin29 (=PA8=MRSUBG_RX_SEQUENCE)
CN4/Pin30(=PA11=MRSUBG_RX_CLOCK)
Any ideas?
Thanks
OK, one step further: The Output of the received Radio data is NOT on "MRSUBG_RX_DATA" but according to the datasheet at PB1 and PB2 as "MRSUBG_TX_DATA" and "MRSUBG_TX_CLK"
And the IOC code generator does not generate the correct alternative function for these pins.
It seems you have to do it on your own under "MX_GPIO_Init". I added:
/* USER CODE BEGIN MX_GPIO_Init_2 */
/*Configure GPIO pin : PB1 */
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF4_SUBG;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : PB2 */
GPIO_InitStruct.Pin = GPIO_PIN_2;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF4_SUBG;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE END MX_GPIO_Init_2 */
but now my ports are all the time low.
So not a big success. Maybe this helps for anyone out there.