I have a custom board running the MQTT example. I have the board up and running and have been able to run various different pieces of code and the hardware has checked out as functional. The MQTT example works fine and I've updated the code to work AWS IoT. I added the code below and programmed the chip. I immediately get a bus_fault with the code. Once the chip is in the state if I program it with any other code it continues to boot immediately into the bus_fault. I have done full erases of the chip and reprogrammed with basic code and I still get the bus_fault. I stepped through the process slowly with a second board with exactly the same results.
Here is the added code, everything works fine until I add the code for the k_timer.
#define TIMER_INTERVAL_SEC 5 struct k_timer msg_timer; u16_t counter = 0; void controller_send_msg(struct k_timer *timer){ u8_t pld[] = {0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19}; printk("Sending message!"); data_publish(&client, MQTT_QOS_1_AT_LEAST_ONCE, pld, 10); } void main(void) { k_timer_init(&msg_timer, controller_send_msg, NULL); k_timer_start(&msg_timer, K_SECONDS(TIMER_INTERVAL_SEC), K_SECONDS(TIMER_INTERVAL_SEC)); }