linguini1 commented on issue #15826:
URL: https://github.com/apache/nuttx/issues/15826#issuecomment-2666846725

   > [@linguini1](https://github.com/linguini1) what about MS56XX stack size ? 
I don't see CONFIG_MS56XX_THREAD_STACKSIZE in your config, and the default 1024 
may be not enough.
   
   It appears after some debugging that the issue was that the MS56xx driver 
was not waiting long enough between measurement commands, so pressure was 
always being read at 0. I replaced the `up_udelay` calls with `usleep` calls 
and I'm now reading the correct pressure, 101.8kPa. I don't know if something 
is wrong with the `up_udelay` interface in my case and it is shorter than 
expected? Specifically this call: 
https://github.com/apache/nuttx/blob/c9a8f96aace9f63e21e7883c8774330adc4d99ff/drivers/sensors/ms56xx_uorb.c#L289
   
   If I increase the sleep time by an order of magnitude the pressure reads 
correctly. Changing it to 11000us also doesn't seem to be enough, the pressure 
still reads as 0. I suppose this might because `CONFIG_LOOPS_PER_MILLISECOND` 
isn't calibrated for my board? Would it be different from other STM32H7 chips 
if the clock frequency is the same, 480MHz?
   
   Is there a way provided by NuttX to calibrate loops per millisecond properly?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to