MPSL Assert Error and Arch_Except Reason 3 error when using BLE

Hello, I have a custom board that was designed for me, but based off of the Acconeer XM126.  It is very similar with a few minor differences.  The person who designed it has bailed and is no longer reachable.  I am a mechanical engineer with limited coding and electrical knowledge.  I have had to stumble my way through.  There were multiple errors with the board that I have had to fix so far including the wrong HF crystal.  He originally had a 24mhz crystal and I had it replaced with a 32 and proper load capacitance.  The other issue is that he added a push button for BLE pairing.  It appears he meant to send 1.8v to pin y23 when the button is pushed.  It is incorrect and is sending 1.8v to y23 all the time.  I don't know if that could be an issue or not.  I'm not sure where the call out would be for what to do with that pin when it was getting the voltage.  I have searched his source and header files.  The board works with the radar sensor when I flash it with normal distance detecting programs.  However, when I load my program or any example program that uses BLE it gives me the errors I have attached.  MPSL Assert 112, 2185 and Arch except reason 3.  Also, zephyr fatal error 3: Kernel oops on cpu 0, fault during interrupt handling.  This is the last piece of the puzzle for me.  Does anyone have any idea what this might be?  Please remember I am limited in my knowledge.  I have already spent thousands to get here, so I am trying to solve this on my own.  Thanks.

Parents
  • Hi there Mike, 

    Can you share some more info here, its a bit difficult to get in to all the aspects whitout having an overview of the schematic. 

    But if the designers bailed and things have not been updated properly, but you have had to fix the physical board then things can be a bit difficult to debug. 



    The board works with the radar sensor when I flash it with normal distance detecting programs.  However, when I load my program or any example program that uses BLE it gives me the errors I have attached. 

    So looks like most of the HW is ok, but it would be good to see if only a basic sample with BLE would work. 

    Have you tested a simple application like Peripheral UART, https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/peripheral_uart.


    Also feel free to ask about anything and also know that we will help with review schematic and Hardware layout files.

    Regards,
    Jonathan

  • Hi Jonathan, thank you for the reply.  I will attach the schematic for you to review.  I also have the PCB files, if that matters.  In terms of trying samples, I have tried some from the Acconeer sdk and as long as it does not involve BLE they run fine.  Even the bring up example, which is basically a bunch of tests with the exception of BLE.  However, when I run any sample that tries to use a beacon/BLE I get the same error as with my program.  FYI, my program works on the XM126.  I have tried to go through the schematic the best I can and I don't see a lot of differences to the XM126 other than a charging circuit, push button, and some LED's. 

    However, he had put a resistor on the vset circuit of the vol reg and left it out.  It was supposed to go to ground for 1.8v.  So, I put a jumper there and it fixed that problem.  The HF crystal has been replaced, but maybe some solder crossed pads? Or it's a bad crystal?  I did notice the circuit is opposite direction, but from what I read that doesn't matter with the crystal.  Other than that HW wise, there is just that button.  You'll see it on the schematic.  I hope this helps. Also, I will try that periph uart example. 

    MikePCB_XM126_v1.0A.PDF

  • Thank you for the info.  I was wondering about the capacitors on antenna circuit.  How do I know what those should be?  Could those cause the errors?

    I may have been off a little on the pcb capacitance.  The capacitors are set at 15 and maybe should be 16.  The CL is 10 of the crystal.  Do you think that is a problem and could cause the error?

    I am using the acconeer sdk, but also have ncs version 2.5.0.  I've been afraid to update it thinking it might not work with my code.  Should I update that?

    I'm just wondering why if it is a SW issue that it works with the xm126.  What would cause that?  I haven't really tried any NRF examples yet. Just the acconeer.  Not sure how to get the one on github that you posted to build.  I don't know where to put everything for that example or how to download it.  I'm not super familiar with github.  

    Mike

  • mchamberlain1980 said:
    I may have been off a little on the pcb capacitance.  The capacitors are set at 15 and maybe should be 16.  The CL is 10 of the crystal.  Do you think that is a problem and could cause the error?

    not a huge problem, should be useable as long as the layout does not include extra long traces and thus introduce more capacitance in the loop. The error that you are seeing is not related to the load cap offset. 



    mchamberlain1980 said:
    I am using the acconeer sdk, but also have ncs version 2.5.0.  I've been afraid to update it thinking it might not work with my code.  Should I update that?

    You can stick to 2.5.0, should not be a big issue. Just that 2.6 and 2.7 has some improvements and seem to be less confusing so I usually recommend those. 2.5.0 is fine. 



    mchamberlain1980 said:
    I'm just wondering why if it is a SW issue that it works with the xm126.  What would cause that?  I haven't really tried any NRF examples yet. Just the acconeer. 

    I dont know what the Acconeer SDK does so it can be that it mixes things up differently then what we do in our SDK som som of the configuration settings might not match. This is what I am suspecting. 



    mchamberlain1980 said:
    Not sure how to get the one on github that you posted to build.  I don't know where to put everything for that example or how to download it.  I'm not super familiar with github.  

    It is possible to have more then one instance of our SDK installed, so you can have your project in the 2.5.0 version but also download a different to test. 
    But the easy option is to just use our nRF Connect for Desktop app and use the toolchain manager to set up whatever you want. 

    here are som links, but feel free to ask about anything as well. 

    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation/install_ncs.html#legacy_installation_with_toolchain_manager 

    We also have a guide\academy course for starting that takes you through lots of stuff, might be something you want to look at. 
    https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/ This should provide you will all the get going knowledge.



    Will update with some info from the experts on the error code here.

    Regards,
    Jonathan

  • Thanks.  I am curious at what the error codes mean.  I am still a little confused about why my program works with the original xm126 board, but not this board if it is a SW or config issue. 

    I did notice that I can't flash my program to the xm126 using the 52840dk, only using mcuboot.  I get an error.  However, I can flash it both ways on my board.  I thought that I read if it is setup for mcuboot then it could have some memory issues if flashed by jlink?

    My program does use the acconeer sdk.  Does the sdk or config settings matter in terms of the board though?  The xm126 uses the 52840 and the same sensor, of course.  The only major thing that was changed was the bluetooth antenna.  Just a different manufacturer.  

    Thanks,

    Mike

  • Its clock related,

    The MPSL assertion suggests that the 32M crystal did not ramp up, which could indicate a soldering or placement issue with the crystal. Please try to check if the crystal oscillator is able to start by using the code snippet I posted here:  
    RE: MPSL ASSERT: 112, 2134 if using multiple BLE communication 

    So how is it working with another application? If you get one of our BLE apps to run on your device then you have some issues in SW, like manipulating the HFCLK from the application in some way.


    Regards,
    Jonathan

  • Ok, that makes sense.  I'll try that code for checking ramp up time on the clock.  I haven't tried the other application yet.  I will try that tomorrow.  Is there any chance the load capacitance/crystal capacitors are causing it?  I know they are barely off, but just want to make sure.  

    Also, how do I know what capacitors to use on the BLE circuit for matching?

    Mike

Reply Children
  • Also, I tried the peripheral_uart example and in my terminal I just get : *** Booting nRF Connect SDK 2.5.0 *** Starting Nordic UART service example.  It just keeps repeating that.  I tried adding in the snippet of code for the clock ramp up time from the thread you posted and I just got errors and couldn't build it.  Not sure what I did wrong there.  I just tried to add it to the uart example.  Would I get the error with the uart or would it just reboot over and over?  Any suggestions with testing the clock?  Sorry, I may be missing something. 

    Mike

  • Can you add this before "Bluetooth Initialized". 

    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;

        NRF_CLOCK->TASKS_HFCLKSTART=1;

        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)

        {

            // Do nothing

        }

        LOG_INF("HFCLK started successfully. Stat: 0x%08x", NRF_CLOCK->HFCLKSTAT);

    mchamberlain1980 said:
    Sorry, I may be missing something. 

    no problem, will try to solve this. 

    Regards,
    Jonathan

  • I've tried that code, but still get errors with all of it when I compile.  I'm using the peripheral_uart example from the 2.5.0 version sdk.  All I'm doing to copying and pasting it in the main.c file after the defines.  Is there anything else I would need to change or add?  Thanks.

    Mike

  • Jonathan,

    I did replace the 32mhz crystal on two boards and I am still getting the same error.  Not sure where to go from here.  I wish I could get the code to work for testing the HF clock.  

    Mike

  • Hello Mike,

    Jonathan asked if I could pitch in on this one. As I understand we're trying to figure out whether the 32MHz XTAL is working correctly. 

    mchamberlain1980 said:
    I've tried that code, but still get errors with all of it when I compile.  I'm using the peripheral_uart example from the 2.5.0 version sdk.  All I'm doing to copying and pasting it in the main.c file after the defines.  Is there anything else I would need to change or add?

    Can you please share the file where you tried to enter the code that Jonathan proposed (including the parts that you added)?

    Also, please copy and paste the entire build log, including the build errors that you are seeing.

    Best regards,

    Edvin

Related