This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Strange behaviour in HVX callback

Hi,

I want to read data from my ble UART (NUS), to do that I implemented the NUS service and registered the onDataWritten callback (which is the MBED equivalent of the HVX callback i believe)

now, If I try to do something with the data I get via the callback params, I have very strange behavior. as long as I dont use any loops (for/while) everything works fine.

but as soon as I want to use a foor loop, the chip goes in halt state immidiately.

also, the behaviour changes if I use more/less code before the for loop.

my guess is that either something overflows, or some kind of multithreading problems. but I wasnt able to track it down.

thanks for your help,

Jonas

Related