3845 views|2 replies

130

Posts

0

Resources
The OP
 

Nordic nRF52832 Study Notes (1) Introduction, Getting Started, and Preparation [Copy link]

Recently, the Internet of Things has become a general trend, VR and AR are in the ascendant, and various bracelets, remote controls, and smart homes are also making their debut. The leaders at the forefront of technology have been working hard, and various intentions and hints are being transmitted. The Internet of Things, wireless communications, and mobile Internet will become new goals and favorites. The spirit of "Internet +" has been clearly and thoroughly conveyed at the recent mobilization meeting for the e-sports competition, and even mobile phones are required to make APPs for control. In short, wireless communication has been placed in an unprecedented position.
The commonly used standard wireless communication protocols are WiFi (802.11a/b/g/n), Bluetooth, ZigBee (802.15.4), etc. They each have their own advantages and disadvantages.
WiFi consumes too much power, has a high rate, is suitable for transmitting data streams (files), not for control, and has a short distance.
Bluetooth has very low power consumption (BLE), and has a long history and mature technology. It is a standard feature of mobile phones, with a moderate distance, suitable for control and small-scale data transmission. (BLE means low-power Bluetooth, which refers to Bluetooth 4.2)
ZigBee also has low power consumption, a long communication distance, and a low transmission rate. It is a communication protocol designed for automatic control, but the technology is still not mature enough and the networking is relatively complex.
In addition, there are various wireless communication protocols such as Z-wave, Thread, ANT, but they are not as universal as the above ones.
6LoWPAN also seems to have great potential, but it is just getting started.
As an introduction to wireless communication, I chose to start with Bluetooth.
There are many common Bluetooth modules on the market. TI's CC series, Dialog's DA series, and Nordic's nRF series are all excellent products.
Dialog's product hardware structure is special, the overall cost is low but the development is complex. Both the CC series and the nRF series are products with rich data resources and are widely used. The product I chose is Nordic's nRF52832, which supports Bluetooth 4.2 (BLE) and can even support 5.0.
Most of these Bluetooth modules are equipped with MCU cores, or simply an MCU with Bluetooth function. Compared with TI products, nRF52832 has much richer hardware resources (Cortex-M4F, 512K Flash, 64K RAM, xxAA version), which means that larger-scale projects are possible.
(Actually the real reason is that I don't quite understand the pin definition of the CC series.... After learning 52832, I may also be able to get started with CC2640)
I don't want to buy a development board anymore, because I'm used to using TI's TM4C1294 for development, so most of the main projects are done with 1294. I learn 52832 mainly to become familiar with the configuration and use of Bluetooth. So I bought a minimum system board (strictly speaking, it doesn't count, it just brings out all the pins and adds a copper-plated antenna).
Then I encountered many problems.
92px] When I used 1294 before, I used TI's official EvaluationKit board, which came with a simulation module (Stellaris ICDI). As long as the driver was installed, I could flash the gold program and debug it. Therefore, I never considered the issue of interface simulation. Now, looking at the pin diagram in the 52832 chip manual, I only found two SWDIO and SWDCLK pins, and I still have no idea how to burn the program into them. Recalling other cases of using 32 development boards, it seems that something called Jlink is needed? I quickly went to Taobao to check the situation of the 52832 development board, and it is true. The Jlink emulator is necessary. The development board has a 20-pin JTAG interface reserved. The emulator is directly connected between the development board and the PC, and then with the corresponding driver, it can be downloaded and simulated. But the product I bought does not have a JTAG interface, and SWD and JTAG seem to be different, right?
After searching for a while, I have a general understanding of JTAG, SWD, and JLink. JTAG and SWD are indeed different protocols. Jlink itself defaults to JTAG, but since JLinkV6, Jlink emulators have also begun to support SWD. After V8, the support for SWD has been quite good. So I bought another Jlink emulator, which is said to be a V8 dedicated to the nrf5 series. One emulator is more expensive than two 52832 boards I bought. After I got it, the workmanship made me instantly conclude that it was a pirated product. . Fortunately, it seems to have the logo JTAG+SWD... In the data sheet of 52832, it has basically been confirmed that this chip only supports SWD. I hope it can be used (laugh). It's probably just connecting the SWD pin to the specific pin of the emulator.
Then comes the software part. I'm used to TI's datasheet and SDK, and Nordic's is really... a lot worse. . The IDE used is MDK Keil, but the pack version in the latest version of nRF_DeviceFamilyPack provided by the official website and the latest version of the SDK example are actually different (the pack has been updated to 8.14.1, while the SDK uses 8.12.0, and the SDK also uses the latest version). Okay, maybe the SDK hasn't been updated yet, but where can I download the old version of the pack? I can only add Device and CMSIS manually, and then there are the annoying include paths. The file structure of SDK is quite good, and various packages, drivers and libraries are quite complete and organized. However, some drivers and library files required for initialization are included in various folders. In comparison, TI's driverlib is too convenient. As for the incomparable superiority of TI's pdf function library to Nordic's html, you will know it after using it.
Finally, it was time to compile. I took out the official example and compiled it. Sure enough, there were a lot of errors. There were many problems such as variable definition statements not at the beginning of the function. There were also a lot of strange formats of defining structures and initializing them. Could it be that my Keil MDK 5.20 is already very old?
After manually correcting all the errors in the official library, I took out my own initialization empty project and finally compiled it. It was indeed much slower than TI's. .
In the specific operation, I borrowed a lot of knowledge from Elson of Sina Blog, and you are also welcome to have a look.
NRF52832 Development Log
In view of the board has not arrived yet, I can only go here first
This content is originally created by EEWORLD forum user hzeeng. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source0)] Then comes the software part. I am used to TI's datasheet and SDK, and Nordic's is really... a much worse experience. . The IDE used is MDK Keil, but the pack version in the latest version of nRF_DeviceFamilyPack provided by the official website and the latest version of the SDK example are actually different (the pack has been updated to 8.14.1, while the SDK uses 8.12.0, and the SDK also uses the latest version). Well, maybe the SDK has not been updated yet, but where can I download the old version of the pack? I can only add Device and CMSIS manually, and then there are the annoying include paths. The file structure of the SDK is quite excellent, and the various packages, drivers, and libraries are quite complete and organized, but some drivers and library files required for initialization are included in various folders. In comparison, TI's driverlib is simply too convenient. As for the incomparable superiority of TI's pdf function library to Nordic's html. . You will know it after using it.
Finally, it was time to compile. I took out the official example and compiled it. Sure enough, there were a lot of errors. There were many problems such as variable definition statements not at the beginning of the function. There were also a lot of strange formats of defining structures and initializing them. Could it be that my Keil MDK 5.20 is already very old?
After manually correcting all the errors in the official library, I took out my own initialization empty project and finally compiled it. It was indeed much slower than TI's. .
In the specific operation, I borrowed a lot of knowledge from Elson of Sina Blog, and you are also welcome to have a look.
NRF52832 Development Log
In view of the board has not arrived yet, I can only go here first
This content is originally created by EEWORLD forum user hzeeng. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source0)] Then comes the software part. I am used to TI's datasheet and SDK, and Nordic's is really... a much worse experience. . The IDE used is MDK Keil, but the pack version in the latest version of nRF_DeviceFamilyPack provided by the official website and the latest version of the SDK example are actually different (the pack has been updated to 8.14.1, while the SDK uses 8.12.0, and the SDK also uses the latest version). Well, maybe the SDK has not been updated yet, but where can I download the old version of the pack? I can only add Device and CMSIS manually, and then there are the annoying include paths. The file structure of the SDK is quite excellent, and the various packages, drivers, and libraries are quite complete and organized, but some drivers and library files required for initialization are included in various folders. In comparison, TI's driverlib is simply too convenient. As for the incomparable superiority of TI's pdf function library to Nordic's html. . You will know it after using it.
Finally, it was time to compile. I took out the official example and compiled it. Sure enough, there were a lot of errors. There were many problems such as variable definition statements not at the beginning of the function. There were also a lot of strange formats of defining structures and initializing them. Could it be that my Keil MDK 5.20 is already very old?
After manually correcting all the errors in the official library, I took out my own initialization empty project and finally compiled it. It was indeed much slower than TI's. .
In the specific operation, I borrowed a lot of knowledge from Elson of Sina Blog, and you are also welcome to have a look.
NRF52832 Development Log
In view of the board has not arrived yet, I can only go here first
This content is originally created by EEWORLD forum user hzeeng. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the sourcecn/s/articlelist_2684296980_1_1.html[/url]
Since the board hasn't arrived yet, I can only go here first
This content was originally created by EEWORLD forum user hzeeng. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the sourcecn/s/articlelist_2684296980_1_1.html[/url]
Since the board hasn't arrived yet, I can only go here first
This content was originally created by EEWORLD forum user hzeeng. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source

This post is from RF/Wirelessly

Latest reply

Looking forward to subsequent sharing! Using MDK KEIL's SWD can be directly downloaded and simulated. Just like STM32   Details Published on 2022-3-19 14:48
 

130

Posts

0

Resources
2
 
This post is for sharing. If you need 52832 materials, please contact: q2355239035, 13823261387wei
This post is from RF/Wirelessly
 
 

1024

Posts

0

Resources
3
 

Looking forward to subsequent sharing!

Using MDK KEIL's SWD can be directly downloaded and simulated. Just like STM32

This post is from RF/Wirelessly
Personal signatureچوآن شـين
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list