Skip to main content
Dnesh Sadat
Associate II
February 5, 2020
Question

UARTs receive buffer in STM32F030

  • February 5, 2020
  • 3 replies
  • 1017 views

Hi all,

I'm trying to use a example which works and compile correctly on stm32f103 (cortex-m3) family.Now i want to use this example on stm32f030c8t6 ,but there is erorr on line 6:

BOOL
xFCPortSerialGetByte( CHAR * pucByte )
{
 /* Return the byte in the UARTs receive buffer. This function is called
 */
 *pucByte = (uint8_t)(huart1.Instance->DR & (uint8_t)0x00FF); 
 return TRUE;
}

After i search about it,i found out there is NO DR register in Cortex-m0.

What should i use instead of the code above for cortex-m0?

Best Regards,

Danesh

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
February 5, 2020

RDR

JW

Dnesh Sadat
Associate II
February 5, 2020

Thank you,

I change but now i have this erorrs,why?

Rs485_Test_Modbus\Rs485_Test_Modbus.axf: Error: L6218E: Undefined symbol eMBRegCoilsCB (referred from mbfunccoils.o).
Rs485_Test_Modbus\Rs485_Test_Modbus.axf: Error: L6218E: Undefined symbol eMBRegDiscreteCB (referred from mbfuncdisc.o).
Rs485_Test_Modbus\Rs485_Test_Modbus.axf: Error: L6218E: Undefined symbol eMBRegHoldingCB (referred from mbfuncholding.o).
Rs485_Test_Modbus\Rs485_Test_Modbus.axf: Error: L6218E: Undefined symbol eMBRegInputCB (referred from mbfuncinput.o).
Rs485_Test_Modbus\Rs485_Test_Modbus.axf: Error: L6218E: Undefined symbol _Error_Handler (referred from porttimer.o).
Rs485_Test_Modbus\Rs485_Test_Modbus.axf: Error: L6218E: Undefined symbol __aeabi_assert (referred from mbrtu.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.

How can i correct them?

waclawek.jan
Super User
February 5, 2020

Maybe some .c source files (containing eMBRegCoilsCB etc.) are missing from your project. This is not related to STM32 as such, but how did you set up your project in Keil.

JW