Sorry, folks, for asking a newbie question. Well, maybe it isn't such a newbie question after all, but some gaps in the SDK documentation and examples. Specifically, I'm:
- Using SDK 15.2.0 with an nRF52832 target, building with SES 4.12.
- Trying to do TWI access to a typical register-based device, i.e., first byte of the transfer is a write of the starting register address in the device, followed by a series of reads or writes.
- Nothing else needs to go on in the app while the TWI transfer is being completed, so might as well use blocking I/O.
- Decided to use the high-level TWIM support to keep the code as simple as possible.
Here's where things get interesting:
- There's no clear description of the difference between nrf and nrfx versions, at least at the top level of the docs. (Do I have to have read all the release notes for prior SDK versions to get this all straight?). Thought I had it straight, but then I keep getting confused.
- EasyDMA or not? Where is this described?
- Totally lacking from the examples is any discussion of the proper sdk_config.h settings and why they are the way they are. And there are lots of them (especially TWI settings). Any attempt to merge two example apps can be fraught with difficulty trying to reconcile these settings, whether done with the wizard or by hand.
About the most useful info I've found is in a discussion here in DevZone, in this exchange:
I seem to have stumbled on a working set of sdk_config.h settings that allow me to merge the TWIM example into one of the BLE peripheral apps. So I could make headway if:
- Someone could tell me how to modify the example in the posting above for nrf instead of nrfx, and
- If TWIM doesn't allow blocking access, include changes for the interrupt handler as well.
For others who aren't full time developers with the nRF52 series, it would be useful if there were more documentation in the examples, discussing why things are being done the way they are and what variations are possible. And, of course, document the sdk_config.h settings.
Mike
PS: In spite of my complaints above, I sincerely appreciate the increased effort Nordic has put into supporting a broader developer community. Hope the suggestions are taken in the positive way they are intended.