F407 and lis3dsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 6:01 AM
I'm try use only registers for lis3dsh.
https://community.st.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fmas-kon%2FF407-LIS3DSH
- my code. This code sometimes is worked, but sometimes it stopped. Can any help my?
#cmsis #registers #lis3dsh Note: this post was migrated and contained many threaded conversations, some content may be missing.- Labels:
-
CMSIS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 6:17 AM
So what debugging have you done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 8:08 AM
Anytime funtion
uint8_t SPI1SendData(uint8_t data)
{ while (!(SPI1->SR & SPI_SR_TXE)){}; SPI1->DR = data; while (!(SPI1->SR & SPI_SR_RXNE)){}; data = SPI1->DR; return data;}return 0xFF.
:(
Why, I don,t know...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 8:12 AM
Looks like CS (chip select) is not enabled or sensor internal register address embedded in data sent to the sensor is wrong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 8:58 AM
Have you actually looked at the SPI lines on an oscilloscope to see what's happening ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 9:01 AM
I'm have not oscilloscope..
:(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 10:22 AM
Similar question just posted:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 11:21 AM
You're pretty much stuck when it comes to hardware debugging, then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 12:13 PM
Check wiring. CS needs to be set to 0 when want to read / write through SPI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 12:20 PM
It's stm32f4-disco..
