Hi,
While developing a Python script to get data from the ADXL1002 sensor (using the diverse boards specified in the topic subject) i've come across a bug that I cannot seem to debug myself.
I've encountered no problem gathering the data, but after switching the CN0540 sample rate from 32000 to 16000 I firstly saw that :
-The register kept the precedent value (32000) in memory
-The next value were loaded properly (16000)
After running the read data from buffer function, i've come across Error 110 (I have noticed that this error seems to happen after Error 32 Broken Pipe), here is a screenshot of it :
During the development of my script I have also noticed that my adi package version was quite outdated.
Mine : 0.0.8
Latest : 0.0.14
Even though I have ran all the update options available, is it a software//hardware problem, or did something wrong happened ?
I am talking about my package version because in the one I have, the reset_buffer function is not implemented.
I implemented it myself, all I did was copy/paste the actual package function which is :
def reset_buffer(func): """Wrapper for set calls which require the SPI engine. Without disabling the buffer the DMA would block forever """ def wrapper(*args, **kwargs): if args[0]._reset_on_spi_writes: args[0].rx_destroy_buffer() func(*args, **kwargs) return wrapper
And calling the decorator each time a buffer was modified
The function does seem to work properly and doesn't give me any error.
The appearance of the errors seems to be random, sometimes it is when making an instance of my subclass, sometimes it is when starting the script, sometimes it works well.
The errors seem to be correlated with the setting of the CN0540 sample rate and buffer_size
I have as well already used all the update_tools and scripts provided by the wiki.
I really feel like this is a adi package version problem, is my image broken and did not update well or is there no update at all ?
I also feel like clearing the buffer would resolve the problems.
Thank you for helping me out