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

Print 'Booting Zephyr OS build v2.6' dead loop

Hi Nordic,

I have written a device driver following the guide as Devicetree HOWTOs, and try to call the driver api in main(), but got unexpected output as below.

I have no idea how this happen.  

the main() as below:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <zephyr.h>
#include <sys/printk.h>
#include <drivers/sensor.h>
/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS 1000
void main(void)
{
struct sensor_value value;
const struct device *dev = DEVICE_DT_GET_ANY(ads129xr);
if (!device_is_ready(dev)) {
printk("Device %s is not ready\n", dev->name);
return;
}
printk("Hello World! %s\n", CONFIG_BOARD);
while (1) {
printk("Hello World! %s\n", CONFIG_BOARD);
k_msleep(SLEEP_TIME_MS);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

the driver written as below:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ads129xr.c - ADS1294R ADS1296R ADS1298R ECG acqusition spi device */
/*
* Copyright (c) 2021 scottwan@foxmail.com
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <device.h>
#include <drivers/gpio.h>
#include <drivers/sensor.h>
#include <sys/printk.h>
#include "ads129xr.h"
// Compatible with "ti,ads129xr"
#define DT_DRV_COMPAT ti_ads129xr
struct ads129xr_config {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

the full source code can be accessed from https://github.com/anti996sz/ecg-zephyr