开发环境:
RT-Thread: v5.1.0
MCU:
STM32F429
我在一个线程中向另一个线程发送消息队列,使用的是传结构体,然后就出现报错
FPU ac
tive!
usage fault:
SCB_CFSR_UFSR:0x100 UNALIGNED
代码如下
#define intercom_msg_data_size 63
typedef struct
{
uint8_t cmd;
uint8_t data[intercom_msg_data_size];
}Intercom_msg_t;
void Intercom_control(uint8_t cmd,uint8_t *data,uint8_t length)
{
uint8_t i;
Intercom_msg_t send_msg;
rt_err_t ret=0;
send_msg.cmd = cmd;
for(i=0;imsg_queue_free = msg->next;
rt_spin_unlock_irqrestore(&(mq->spinlock), level);
/* the msg is the new tailer of list, the next shall be NULL */
msg->next = RT_NULL;