Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Nicla Sense ME Large Array Crash

    Nicla Sense ME Large Array Crash

    maxlo
    Member

    Hi, when uploading the code below, which is using a "large" array, to the Arduino Nicla Sense ME, the following error message comes up:

    ++ MbedOS Error Info ++
    Error Status: 0x80FF0144 Code: 324 Module: 255
    Error Message: Assertion failed: _stack_buffer != NULL
    Location: 0x430B9
    File: ./mbed-os/connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.cpp+186
    Error Value: 0x0
    Current Thread: main Id: 0x200051B4 Entry: 0x19E6F StackSize: 0xC00 StackMem: 0x20004590 SP: 0x2000508C
    For more info, visit: https://mbed.com/s/error?error=0x80FF0144&tgt=NICLA
    -- MbedOS Error Info --

    This does not happen if the array is small (e.g. 2 instead of 800), or if the line "BHY2.begin();" is commented out. The example sketches work, but just adding a large array to the code leads to this error.
    The Code:

    #include "Arduino_BHY2.h"
    int all_readings[800];
    void setup() {
    all_readings[0] = 0;
    BHY2.begin(); // if this command is commented out: no error is thrown
    }

    void loop() {
    BHY2.update(); // this line does not impact the error, so commenting it out has no effect on the error.
    }

    19 REPLIES 19

    nicolasvl
    Occasional Visitor

    Hello, thanks alot for your help!

    I followed the provided instructions and the error does no longer appear. It does however seem as if the program is not executing at all. There is a program and its output attached which should demonstrate the issue. 

    Do you have any idea what might cause this?

    Thank you!

    zgg
    Long-established Member

    Hello

     

    thanks for the update, and from your provided log, it does seem that the application is running well.

    there is nothing printed, because that is way  this example sketch is designed.

    the sketch is actually serving as a wireless sensor hub actively listening to reuquests, you would need a client (tool) to request sensor data.

    Such a tool is available in the same package you downloaded.

    You could refer to the section: "Sensor Data over BLE" in the Nicla cheatsheet here: https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet

    The tool is called: "bhy" which is a command line tool running on your PC.

     

    let me know how it works.

    zgg
    Long-established Member

    @niclasvl

    have you been able to verify that the problem was solved.

    also, if you do want something being printed to the serial port, you could use the example sketch: "Arduino_BHY2-> Standalone.ino " instead of the "App" sketch.

     

    zgg
    Long-established Member

    @niclasvl

     

    For your info, the Arduino_BHY2 library has been optimized for the RAM size, and it should be able to save an additional ~2KBytes of RAM. 

    So check out the latest library from: https://github.com/arduino/nicla-sense-me-fw

     

    BSTRobin
    Community Moderator
    Community Moderator

    Thanks for your sharing, @zgg.

    Hello maxlo,

    Did it work well on you side?

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist