<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp;amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125796/integration-of-max30001-with-ezurio-nrf54l15u-dk-application-hangs-after-tf-m-boot-spi-jumper-configuration</link><description>Hi Nordic Support Team, 
 I am currently working on integrating the MAX30001 ECG/Bio-impedance sensor with the Ezurio nRF54L15U DK (nRF54L series). I am using the nRF Connect SDK V3.1.1 
 I have two main issues: the application seems to hang/stop outputting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Nov 2025 12:44:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125796/integration-of-max30001-with-ezurio-nrf54l15u-dk-application-hangs-after-tf-m-boot-spi-jumper-configuration" /><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555508?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 12:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:006db4c3-a673-43b8-8aec-554e81c8a69d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&lt;span&gt;What I meant to suggest was using a logic analyser or oscilloscope to inspect the TWI transactions between the nRF and the MAX30001 slave to determine why the initialization is failing.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555481?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 10:10:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0ede2a2-af7e-4cb4-948b-d45f84a79db8</guid><dc:creator>Vishveshwaran</dc:creator><description>&lt;p&gt;i am not having a proper driver file also, the driver file which i am using now is based on a git repo and that too with lot of changes in it, so i dont know whether that is the problem, can you tell me how to access the logic analyser in the nrf for this particular issue?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555476?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 10:00:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61dda885-a73b-4314-83a7-62cc973fdc66</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;device_is_ready() is returning false because the driver initialisation failed on boot before main(), so there is no point in calling this function in a loop. You can probe the I2C bus with a Logic analyser or oscilloscope to find try find&amp;nbsp;why the initialisation is failing. Maybe it&amp;#39;s something&amp;nbsp;simple as an address NAK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555474?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 09:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c20e17bd-1a87-44fe-963d-4a8fc514659a</guid><dc:creator>Vishveshwaran</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/drivers/sensor.h&amp;gt;
#include &amp;quot;max30001.h&amp;quot; 

#define LED0_NODE DT_ALIAS(led0)
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);

#define THREAD_STACKSIZE 4096
#define THREAD_PRIORITY 7

K_THREAD_STACK_DEFINE(sensor_thread_stack, THREAD_STACKSIZE);
static struct k_thread sensor_thread;

/* --- BLINKY OF LIFE --- */
void blink_status_led(int times) {
    if (!gpio_is_ready_dt(&amp;amp;led)) return;
    for (int i=0; i&amp;lt;times; i++) {
        gpio_pin_toggle_dt(&amp;amp;led);
        k_msleep(100);
        gpio_pin_toggle_dt(&amp;amp;led);
        k_msleep(100);
    }
}

static void thread_entry(void *p1, void *p2, void *p3)
{
    int ret;
    struct sensor_value ecg_val, bioz_val, rtor_val, leadoff_val;
    const struct device *sensor_dev = (const struct device *)p1;
    
    printk(&amp;quot;--- SENSOR THREAD STARTED ---\n&amp;quot;);

    while (1) {
        // Fetch sample from driver
        ret = sensor_sample_fetch(sensor_dev); 

        if (ret == 0) {
            // Valid Data Found
            sensor_channel_get(sensor_dev, SENSOR_CHAN_ECG_UV, &amp;amp;ecg_val);
            sensor_channel_get(sensor_dev, SENSOR_CHAN_BIOZ_UV, &amp;amp;bioz_val);
            sensor_channel_get(sensor_dev, SENSOR_CHAN_RTOR, &amp;amp;rtor_val);
            sensor_channel_get(sensor_dev, SENSOR_CHAN_LDOFF, &amp;amp;leadoff_val);

            double ecg_uv = sensor_value_to_double(&amp;amp;ecg_val);
            double bioz_ohm = sensor_value_to_double(&amp;amp;bioz_val);
            
            // Print format: ECG, BioZ, RTOR, LeadOff
            printk(&amp;quot;%.0f,%.2f,%d,%d\n&amp;quot;, ecg_uv, bioz_ohm, rtor_val.val1, leadoff_val.val1);
            
            // Toggle LED on every successful sample
            gpio_pin_toggle_dt(&amp;amp;led);
        } else {
            // Error handling
            if (ret == -11) {
                // -11 is EAGAIN (No data yet), just wait a tiny bit
                k_usleep(100); 
            } else {
                // Actual Error (e.g., SPI fail)
                printk(&amp;quot;Fetch Error: %d\n&amp;quot;, ret);
                k_msleep(1000); 
            }
        }
    }
}

void sensor_init(void)
{
    const struct device *sensor_dev = DEVICE_DT_GET(DT_NODELABEL(max30001));	    
    
    // RETRY LOOP: Don&amp;#39;t give up if sensor isn&amp;#39;t ready immediately
    int retry_count = 0;
    while (!device_is_ready(sensor_dev)) {
        printk(&amp;quot;Waiting for MAX30001 (Attempt %d)...\n&amp;quot;, ++retry_count);
        blink_status_led(2); // Double blink = Error/Waiting
        k_msleep(2000);
    }
    
    printk(&amp;quot;MAX30001 is READY! Starting thread.\n&amp;quot;);
    blink_status_led(5); // 5 Fast blinks = Success
    
    k_thread_create(&amp;amp;sensor_thread, sensor_thread_stack,
            K_THREAD_STACK_SIZEOF(sensor_thread_stack),
            thread_entry, (void *)sensor_dev, NULL, NULL,
            THREAD_PRIORITY, 0, K_FOREVER);
    k_thread_start(&amp;amp;sensor_thread);
}    

int main(void)
{
    // 1. Setup LED
    if (gpio_is_ready_dt(&amp;amp;led)) {
        gpio_pin_configure_dt(&amp;amp;led, GPIO_OUTPUT_ACTIVE);
        gpio_pin_set_dt(&amp;amp;led, 0);
    }

    // 2. Prove Life immediately
    printk(&amp;quot;\n\n*** BOOTING NRF54L15 ECG APP ***\n&amp;quot;);
    blink_status_led(3); // 3 Slow blinks on startup
    
    // 3. Init Sensor
    sensor_init(); 

    while (1) {
        k_sleep(K_FOREVER);
    }
    return 0;
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;attached my MAIN.C also&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555473?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 09:51:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33924ee8-26c3-4947-b3b7-0cb294934918</guid><dc:creator>Vishveshwaran</dc:creator><description>&lt;p&gt;it is not hanging, in the rtt terminal i can see the log&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SEGGER J-Link V8.66 - Real time terminal output&lt;br /&gt;SEGGER J-Link (unknown) V1.0, SN=1059980505&lt;br /&gt;Process: JLink.exe&lt;br /&gt;MAX30001 ID: 0 0 0&lt;br /&gt;*** Booting nRF Connect SDK v3.1.1-e2a97fe2578a ***&lt;br /&gt;*** Using Zephyr OS v4.1.99-ff8f0c579eeb ***&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;*** BOOTING NRF54L15 ECG APP ***&lt;br /&gt;Waiting for MAX30001 (Attempt 1)...&lt;br /&gt;Waiting for MAX30001 (Attempt 2)...&lt;br /&gt;Waiting for MAX30001 (Attempt 3)...&lt;br /&gt;Waiting for MAX30001 (Attempt 4)...&lt;br /&gt;Waiting for MAX30001 (Attempt 5)...&lt;br /&gt;Waiting for MAX30001 (Attempt 6)...&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555472?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 09:49:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0af9e04e-ca66-4078-b275-1ec7a4d63389</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;So where does the program hang?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555463?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 08:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:351bace9-2afb-408c-970d-6c0a441d6abe</guid><dc:creator>Vishveshwaran</dc:creator><description>&lt;p&gt;&amp;nbsp;Tried without TF-M also not working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integration of MAX30001 with Ezurio nRF54L15U DK: Application Hangs after TF-M Boot &amp; SPI/Jumper Configuration</title><link>https://devzone.nordicsemi.com/thread/555389?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 13:43:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af3abb3f-5523-408c-9925-1a8a1ba0f4b8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I you haven&amp;#39;t already, I would recommend you try to run this without TF-M first to help narrow down the problem. The TF-M log is not reporting any violations or errors, at least. It would also be good if you could try to debug this in VS code to see where the program hangs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>