Hardfault_handler with stm32f103 - stm32

my code is getting stuck inside the HAL_Delay() of my code. On doing the step-into I found out that it is getting inside the hardfault_handler and because of which my code gets stuck inside the HAL_Delay().
Now the issue is that I am not able to get why my code is getting inside the hardfault_handler, I have not invoked any other interrupt, I also tried creating a project again and then running a simple blink led sketch but still, that does not work out and my code is getting stuck in hardfault_handler whenever I use HAL_Delay().
The controller I am using is STM32F103 Cortex M3.
Any valuable suggestions???? on how to solve this thing.

Related

React-leaflet: How to reset the style?

I am trying to reset the styles when I the mouse out event is triggered. But it is giving a error. this is working perfectly fine when I am using react-leaflet 2.8.0. But dont know why its causing an issue now.
geoJsonRef.current.leafletElement.resetStyle(e.target);
Link to the problem

Navigate To at start up simulation

When I run the model, I want my model to go to the viewarea of the simulation parameters in the agent of this user interface. So at the simulation and java actions I added this by the next code (also a screenshot is added at the bottom):
root.uI_startUP.SimulationParameters.navigateTo();
The strange thing is when I run the model for the first time, he goes for like 1 second to this view area, but then automatically returns to the main agent. When I stop the model and restart it again (and keep the run window open), this problem is not happening and it is staying in the good user-interface agent view area.
What could be the reason behind this? and how can this be solved.
Added later:
At the moment I fixed it by creating an event which is triggered by the variable start==true, and after that navigates to the interface and sets this value to false. see figure below
This works, and seems to be a solution.
But I'm still curious why the first method is not working..
Seems to be the code in "Initial experiment setup" that messes here.
Remove both code snippets and only call uI_startUP.SimulationParameters.navigateTo() on the "On startup" of Main.
This is how you should do it anyway :)

Plotly Dash - Callback triggers sometimes & the same callback doesnt trigger sometime

I am facing issue with callbacks. I have 3 drop downs, one scattermap , one table and one slider on the screen and they all need to work in tandem and i have 5 call backs. When i execute the application all my callbacks associated with these controls execute in random order. After that when i click on scattermap it may or may not work. Say we assume it worked. Then i can navigate all around without any hassle. Then if i execute the application then click on the scattermap then as i mentioned it may or may not work. Say suppose it didn't work this time. If so is the case it will not work at all no matter what i do and simulaneously one specific dropdown also becomes dysfunctional. However if click any of the other two drop downs then evrything will start functioning as normal.
I have digged really deep into this and figured out that this has nothing to do with my code. The underlying issue is that when the click doesn't work the reason the reason behind that is the callback isn't getting triggered. I found out this by applying some debugging techniques and i am 100% sure the callback is not firing. Can anyone help me resolve/understand this please.

Program that will run continuously without any condition

I want to write code in swift in xcode, which should has button function and others, but the code should has function, which will run continuously without any condition. Is there any chance to do this?
If you want code to run continuously you might want a loop (as in while-loop) which runs in a background thread so you don't block the UI. Everytime the UI should update, you will have to dispatch the changing activities back to the UI-thread.
For a general tutorial to swift-multithreading refer to
https://www.raywenderlich.com/148513/grand-central-dispatch-tutorial-swift-3-part-1

Automatic execution of code after finishing a cell in Jupyter

Is it possible to set up Jupyter so that whenever a cell is finished running it would automatically carry out some code?
Some of my code takes a long time to run, and it is quite inconvenient to have to check back often to see whether the code is completed. I can manually add some notification code at the end of each cell, but it would be much easier if I can simply put this code in say, jupyter_application_config.py or custom.js, and have jupyter calls it automatically.
It would be even better if it can be set up so that the code is executed if the cell takes more than n seconds to run.
This answer is a bit late... but I also wanted notifications when long running code in Jupyter cells had completed, and I found the Notify extension to be limiting (eg., no notifications if I was away from my computer). My solution for myself was to create a custom magic that using Pushbullet to send notifications to both my computer and my iPhone.
The magic is called pushnote. Maybe it will be helpful for you.