This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TM4C123GH6PZ这款芯片如何支持浮点数据打印

我使用串口进行浮点数据打印会进入FaultIsR中断。后面得知,TI的芯片进行浮点数据打印需要打开CCS的设置,选择支持串口浮点打印。请问keil如何进行让TM4C123GH6PZ这款芯片支持浮点数据打印?

void UART_printf(uint32_t baseAddress, const char *format,...)
{
	uint32_t length;
	va_list args;
	uint32_t i;
	char TxBuffer[128] = {0};

	va_start(args, format);
	length = vsnprintf((char*)TxBuffer, sizeof(TxBuffer), (char*)format, args);
	va_end(args);

	for(i = 0; i < length; i++)
	{
		 while(UARTBusy(baseAddress));
		 UARTCharPut(baseAddress,TxBuffer[i]);
	}
}
If you print floating point data, you enter a FaultlsR interrupt. But if you print integer data instead, there's no problem.

Parents
  • I used the serial port to print floating point data and would enter FaultIsR interrupt. It is later learned that the TI chip needs to open the Settings of CCS for floating point data printing and select support for serial port floating point printing. May I ask how keil can make TM4C123GH6PZ chip support floating-point data printing?

Reply
  • I used the serial port to print floating point data and would enter FaultIsR interrupt. It is later learned that the TI chip needs to open the Settings of CCS for floating point data printing and select support for serial port floating point printing. May I ask how keil can make TM4C123GH6PZ chip support floating-point data printing?

Children
No data