STMicroelectronics X-CUBE-NFC7 User Manual
PDF
Dokument
Reklama
Reklama
UM3235 User manual Getting started with the X-CUBE-NFC7 software package for STM32CubeMX Introduction This document provides the guidelines to configure and use the X-CUBE-NFC7 software package V1.0.0 for STM32CubeMX (minimum required version V6.3.0). The document contains a description of the provided sample applications. Step-By-Step Section describes the steps required to configure a generic project using the X-NUCLEO-NFC07A1 expansion board with any Nucleo board or ST25DVXXKC component with custom boards, as well as a description of the steps to configure and use the sample applications provided in the package. Information and documentation related to the NFC components, the X-NUCLEO-NFC07A1 expansion board and the ST expansion software for NFC tag are available on www.st.com. UM3235 - Rev 1 - June 2024 For further information contact your local STMicroelectronics sales office. www.st.com UM3235 Acronyms and abbreviations 1 Acronyms and abbreviations Table 1. List of acronyms UM3235 - Rev 1 Acronym Description NFC Near Field Communication NDEF NFC data exchange format RFID Radio frequency identification HAL Hardware Abstraction Layer I2C Inter-Integrated Circuit NVIC Nested Vectored Interrupt Controller RTC Real Time Operating System RTOS Serial Peripheral Interface U(S)ART Universal (Synchronous) Asynchronous Receiver Transmitter URI Uniform resource identifier page 2/45 UM3235 What is STM32Cube? 2 What is STM32Cube? STM32Cube represents an original initiative by STMicroelectronics to ease developers' life by reducing development effort, time and cost. STM32Cube covers the STM32 portfolio. Version 1.x of STM32Cube includes: • • STM32CubeMX, a graphical software configuration tool that allows the generation of C initialization code using graphical wizards. A comprehensive embedded software platform, delivered per series (such as the STM32CubeF4 for STM32F4 series). – – – UM3235 - Rev 1 STM32Cube HAL, an STM32 abstraction layer embedded software, ensuring maximized portability across the STM32 portfolio; a consistent set of middleware components, such as RTOS, USB, TCP/IP, graphics; all embedded software utilities, including a full set of examples. page 3/45 UM3235 License 3 License The software provided in this package is licensed under Software License Agreement SLA0095. UM3235 - Rev 1 page 4/45 UM3235 Sample applications and examples description 4 Sample applications and examples description In this section, a short overview of the sample applications and examples included in the X-CUBE-NFC7 pack is provided. The sample applications/examples: • • 4.1 are ready-to-use projects that can be generated through the STM32CubeMX for any Nucleo board and using the X-NUCLEO-NFC07A1 expansion board. show the users how to use the APIs to correctly initialize and use the dynamic NFC/RFID tag IC (ST25DVXXKC device). NFC07A1_NDEF_URI This application shows how to use the X-NUCLEO-NFC07A1 write an NDEF message to the ST25DVXXKC EEPROM using the NDEF lib middleware. The yellow LED is switched ON when the message has been successfully written. 4.2 NFC07A1_NDEF_URI This application shows how to use the X-NUCLEO-NFC07A1 write an NDEF message to the ST25DVXXKC EEPROM using the NDEF lib middleware. The yellow LED is switched ON when the message has been successfully written. 4.3 NFC07A1_GeneralPurposeOutput This example shows how to enable and use the GPO. After initialization, an interrupt is programmed to detect field changes in proximity of the ST25DVXXKC. The green LED is switched ON when the field is detected and switched OFF when the field disappears. 4.4 NFC07A1_I2CPROTECTION This example shows how to create areas in the ST25DVXXKC and how to protect them. Text is displayed on a UART console (via ST-LINK) if a PC is connected. The example serial settings can be configured by user changing the settings of USART2 in the STM32CubeMX GUI. 4.5 NFC07A1_Mailbox This example shows how to write a message into the mailbox and how to read mailbox status register of ST25DVXXKC device. Text is displayed on a UART console (via ST-LINK) if a PC is connected. The example serial settings can be configured by user changing the settings of USART2 in the STM32CubeMX GUI. UM3235 - Rev 1 page 5/45 UM3235 Installing the X-CUBE-NFC7 pack in STM32CubeMX 5 Installing the X-CUBE-NFC7 pack in STM32CubeMX After downloading (from www.st.com), installing and launching the STM32CubeMX (V≥5.4.0), the X-CUBE-NFC7 pack can be installed in few steps. Step 1. From the menu, select Help > Manage embedded software packages Figure 1. Managing embedded software packs in STM32CubeMX Step 2. From the Embedded Software Packages Manager window, press the ‘Refresh’ button to get an updated list of the add-on packs. Go to the ‘STMicroelectronics’ tab to find the X-CUBE-NFC7 pack. Figure 2. Installing the X-CUBE-NFC7 pack in STM32CubeMX UM3235 - Rev 1 page 6/45 UM3235 Installing the X-CUBE-NFC7 pack in STM32CubeMX Step 3. Select it checking the corresponding box and install it pressing the ‘Install Now’ button. Once the installation is completed, the corresponding box will become green, the ‘Close’ button can be pressed and the configuration of a new project can start. Figure 3. The X-CUBE-NFC7 pack in STM32CubeMX UM3235 - Rev 1 page 7/45 UM3235 Starting a new project 6 Starting a new project After launching the STM32CubeMX, you can choose if starting a New Project from the MCU Selector or from the Board Selector. Figure 4. STM32CubeMX main page The MCU/Board selector window will pop up. From this window, the STM32 MCU or platform can be selected. Figure 5. STM32CubeMX MCU/Board Selector window After selecting the MCU or the Board, the selected STM32 pinout will appear. From this window the user can set up the project, by adding one or more Additional pack and peripherals and configuring the clock. UM3235 - Rev 1 page 8/45 UM3235 Starting a new project Figure 6. STM32CubeMX Pinout & Configuration window To add the X-CUBE-NFC7 additional pack to the project, the “Additional packs” button must be clicked. From the Additional pack Component Selection window, the user can either choose to generate, for the selected MCU/Board, one of the enclosed sample applications or a new project. In this latter case, the user must just implement the main application logic without bothering with the pinout and peripherals configuration code that will be automatically generated by STM32CubeMX. Figure 7. STM32CubeMX Corresponding pack Components selection window UM3235 - Rev 1 page 9/45 UM3235 STM32 configuration Steps 7 STM32 configuration Steps The X-NUCLEO-NFC07A1 interfaces with the STM32 microcontroller via the I2C bus. Hence, assuming a user wants to interface the ST X-NUCLEO-NFC07A1 expansion board with a STM32 Nucleo 64 pins board (e.g. a Nucleo-F401RETx) no particular hardware modification must be done. Figure 8. STM32 Nucleo 64 and Nucleo 144 pins with X-NUCLEO-NFC07A1 Figure 9. X-NUCLEO-NFC07A1 pinout UM3235 - Rev 1 page 10/45 UM3235 STM32 configuration Steps 7.1 Use of NFC component without NDEF Library for X-NUCLEO-NFC07A1 This section outlines how to configure STM32CubeMX with X-NUCLEO-NFC07A1 when the use of the sample example is required without the dependencies over NDEF library. With such setup, only driver layers will be configured. To add the X-CUBE-NFC7 additional pack to the project, the “Corresponding pack button” button must be clicked. From the “Corresponding pack Components selection” window, the user has to select the example from the “Device” class and “Board Extension” class as shown in the figure below. Figure 10. STM32CubeMX Corresponding pack Components selection window From the Pinout & Configuration tab: • • • • from the Pinout scheme, click on PB8 and set it as I2C1_SCL; from the Pinout scheme, click on PB9 and set it as I2C1_SDA; enable the I2C1 as I2C from the “Connectivity” category; Configure the I2C1 settings with I2C speed at 400KHz (Fast Mode) from the “Configuration” view; From the Pinout scheme set: Table 2. Pinout scheme Nucleo 64 UM3235 - Rev 1 Nucleo 144 Nucleo-WL55JC Nucleo-WB55RG Pin Signal Pin Signal Pin Signal Pin Signal PB8 I2C1_SCL PB8 I2C1_SCL PA12 I2C2_SCL PB8 I2C1_SCL PB9 I2C1_SDA PB9 I2C1_SDA PA11 I2C2_SDA PB9 I2C1_SDA page 11/45 UM3235 STM32 configuration Steps Figure 11. STM32CubeMX Pinout & Configuration tab and I2C settings From the Additional pack category, press the ‘Stmicroelectronics.X-CUBE-NFC7.1.0.0’ item, enable the “Board Extension NFC” checkbox from the “Mode” view and set the following Platform Settings from the “Configuration” view (take into account that according the example chosen some settings can appear or not): Table 3. IPs/Component selection Name BSP_Api Supported IPs Nucleo 64 Nucleo 144 NFC07A1 BUS IO driver BSP_BUS_DRIVER I2C:I2C I2C1(1) I2C1 NFC7 GPO PIN HAL_EXTI_DRIVER GPIO:EXTI PA6 PA6 PF15 YELLOW LED HAL_GPIO_DRIVER GPIO:Output PA10(2) BLUE LED HAL_GPIO_DRIVER GPIO:Output PB5(3) PF14 GREEN LED HAL_GPIO_DRIVER GPIO:Output PB4(4) PE11 BSP USART BSP_COMMON_DRIVER USART:Asynchronous USART2 USART3 BSP BUTTON BSP_COMMON_DRIVER GPIO:EXTI PC13(5) PC13 1. I2C2 in case of NUCLEO-WL55JC1. 2. PB12 for NUCLEO-WL55JC1 and PC6 for NUCLEO-WB55RG. 3. PC10 for NUCLEO-WB55RG. 4. PB8 for NUCLEO-WL55JC1 and PA15 for NUCLEO-WB55RG. 5. PA6 in case of NUCLEO-WB55RG Once all the above-described steps have been performed, the source code of the project using the STMicroelectronics X-CUBE-NFC7 software can be generated clicking the “GENERATE CODE” button. 7.2 Use of NDEF Library with sample applications for X-NUCLEO-NFC07A1 This section outlines how to configure STM32CubeMX with X-NUCLEO-NFC07A1 when the use of the sample applications is required. With such setup, all the components of the expansion software package, including applications, will be properly configured. To add the X-CUBE-NFC7 additional pack to the project, the “Corresponding pack button” button must be clicked. From the “Corresponding pack Components selection” window, the user has to select the “Board Extension” class, NFC07A1_NDEF_URI application from the “Device” class and select the “Wireless” class with “Basic” Interface as shown in the figure below. UM3235 - Rev 1 page 12/45 UM3235 STM32 configuration Steps Figure 12. STM32CubeMX Corresponding pack Components selection window From the Pinout & Configuration tab: • • • from the Pinout scheme, click on PB8 and set it as I2C1_SCL; from the Pinout scheme, click on PB9 and set it as I2C1_SDA; enable the I2C1 as I2C from the “Connectivity” category. From the Pinout scheme, if not already set, set: Table 4. Pin selection for NUCLEO Boards Nucleo 64 PIN Mode PB5(1) Nucleo 144 Label PIN Mode Label GPIO_Output PF14 GPIO_Output PB4(2) GPIO_Output PE11 GPIO_Output PA5(3) GPIO_Output LD2 [Green Led] PB7 GPIO_Output LD2[Blue] PC13(4) GPIO_EXTI13 B1 [Blue PushButton] PC13 GPIO_EXTI13 USER_Btn[B1] 1. PC10 for NUCLEO-WB55RG. 2. PB8 for NUCLEO-WL55JC1 and PA15 for NUCLEO-WB55RG. 3. PB9 for NUCLEO-WL55JC1 and PB0 for NUCLEO-WB55RG. 4. PA6 for NUCLEO-WB55RG. UM3235 - Rev 1 page 13/45 UM3235 STM32 configuration Steps Figure 13. STM32CubeMX Pinout & Configuration tab From the Additional pack category, press the ‘Stmicroelectronics.X-CUBE-NFC7.1.5.0’ item, enable the “Board Extension NFC” and the “Device Application” checkboxes from the “Mode” view and set the following Platform Settings from the “Configuration” view (take into account that according the example chosen some settings can appear or not): Table 5. I2C and Pin selection for NUCLEO Boards Name BSP_Api Supported IPs Nucleo 64 Nucleo 144 NFC07A1 BUS IO driver BSP_BUS_DRIVER I2C:I2C I2C1(1) I2C1 NFC7 GPO PIN HAL_EXTI_DRIVER GPIO:EXTI PA6 PA6 YELLOW LED GPIO:Output PA10(2) PF15 BLUE LED GPIO:Output PB5(3) PF14 GPIO:Output PB4(4) PE11 GREEN LED 1. I2C2 in case of NUCLEO-WL55JC1. 2. PB12 for NUCLEO-WL55JC1 and PC6 for NUCLEO-WB55RG. 3. PC10 for NUCLEO-WB55RG. 4. PB8 for NUCLEO-WL55JC1 and PA15 for NUCLEO-WB55RG. UM3235 - Rev 1 page 14/45 UM3235 STM32 configuration Steps Figure 14. STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_NDEF_URI applications Figure 15. STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_I2CProtection example UM3235 - Rev 1 page 15/45 UM3235 STM32 configuration Steps Figure 16. STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_LowPowerDown example Figure 17. STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_Mailbox example For all the sample applications, the default parameters can be used. From the Configuration & Pinout tab, click on “System Core” category and then on NVIC item to enable the EXTI line interrupts: Table 6. EXTI Line Selection UM3235 - Rev 1 Nucleo 64 Nucleo 144 EXTI line 6 interrupt EXTI line 6 interrupt EXTI line 13 interrupt EXTI line 13 interrupt page 16/45 UM3235 STM32 configuration Steps Figure 18. STM32CubeMX NVIC Configuration From the Configuration & Pinout tab, click on “Connectivity” category and then on I2C1 item to set the I2C speed at 400KHz or 1MHz (for STM32L0/STM32L4 families). If STM32L0/STM32L4 MCU families are used, kindly set the Coefficient of Digital Filter to 2 in Parameter settings: Figure 19. STM32CubeMX I2C Configuration From the Configuration & Pinout tab, click on “Connectivity” category and then on USART2 item and check that the following configuration is set: Table 7. VCOM configuration UM3235 - Rev 1 Baud Rate Word Length Parity Stop Bits 115200 Bits/s 8 Bits (including Parity) None 1 page 17/45 UM3235 STM32 configuration Steps Figure 20. STM32CubeMX USART Configuration Once all the above-described steps have been performed, the sample applications for NFC07A1 using the STMicroelectronics X-CUBE-NFC7 software can be generated clicking the “GENERATE CODE” button. 7.3 Use of ST25DVXXKC component without sample applications for custom boards This section outlines how to configure STM32CubeMX with a custom board that mounts ST25DVXXKC device. With such setup, only drivers layer will be configured. This setup is useful when user does not intend to leverage the sample application provided in the package, to develop his own application code. In this case you can configure the ST25DVXXKC device in order to be used. To add the X-CUBE-NFC7 additional pack to the project, the “Corresponding pack button” button must be clicked. From the “Corresponding pack Components selection” window, the user has to select the “Board Components” class and the “Board Support” class in “STM32Cube_Custom_BSP_Drivers” bundle as shown in figure below. Figure 21. STM32CubeMX Corresponding pack Components selection window UM3235 - Rev 1 page 18/45 UM3235 STM32 configuration Steps Figure 22. STM32CubeMX Pinout & Configuration tab From the Pinout & Configuration tab: • • • from the Pinout scheme, click on PB8 and set it as I2C1_SCL; from the Pinout scheme, click on PB9 and set it as I2C1_SDA; enable the I2C1 as I2C from the “Connectivity” category; From the Pinout scheme, if not already set: Table 8. Pinout and configuration Nucleo 64 PIN Mode PB5(1) PB4(2) PA5(3) GPIO_Output PC13w(4) GPIO_EXTI13 Nucleo 144 Label PIN Mode Label GPIO_Output PF14 GPIO_Output GPIO_Output PE11 GPIO_Output LD2 [Green Led] PB7 GPIO_Output LD2[Blue] B1 [Blue PushButton] PC13 GPIO_EXTI13 USER_Btn[B1] 1. PC10 for NUCLEO-WB55RG. 2. PB8 for NUCLEO-WL55JC1 and PA15 for NUCLEO-WB55RG. 3. PB9 for NUCLEO-WL55JC1 and PB0 for NUCLEO-WB55RG. 4. PA6 for NUCLEO-WB55RG. You can see an example of configuration below. UM3235 - Rev 1 page 19/45 UM3235 STM32 configuration Steps Figure 23. STM32CubeMX Parameter Settings for a custom board Set the following Platform Settings from the “Configuration” view: Table 9. Platform settings Name BSP_Api Supported IPs Nucleo 64 Nucleo 144 ST25DVXXKC BUS IO driver BSP_BUS_DRIVER I2C:I2C I2C1(1) I2C1 ST25DVXXKC GPO PIN HAL_EXTI_DRIVER GPIO:EXTI PA6(2) PA6 GPIO:Output PA8(3) PF13 ST25DVXXKC LPD PIN 1. I2C2 for NUCLEO-WL55JC1. 2. PB4 in case of NUCLEO-WB55RG. 3. PC1 for NUCLEO-WL55JC1, PE4 for NUCLEO-WB55RG. From the Configuration & Pinout tab, click on “System Core” category and then on NVIC item to enable the EXTI line interrupts. Figure 24. STM32CubeMX NVIC Configuration UM3235 - Rev 1 page 20/45 UM3235 STM32 configuration Steps From the Configuration & Pinout tab, click on “Connectivity” category and then on I2C1 item to set the I2C speed at 400KHz (Fast Mode): Figure 25. STM32CubeMX I2C Configuration From the Configuration & Pinout tab, click on “Connectivity” category and then on USART2 button and check the following configuration is set: Table 10. VCOM /UART configuration Baud Rate Word Length Parity Stop Bits 115200 Bits/s 8 Bits (including Parity) None 1 Figure 26. STM32CubeMX USART Configuration Once all the above described steps have been performed, the sample applications for a custom board using the STMicroelectronics X-CUBE-NFC7 software can be generated clicking the “GENERATE CODE” button. UM3235 - Rev 1 page 21/45 UM3235 STM32 configuration Steps 7.4 Porting of X-NUCLEO-NFC07A1 step by step guide In this Section, we will see how to use the X-NUCLEO-NFC07A1 expansion board on any Nucleo board. In this example, we will do a porting on a Nucleo 144 board NUCLEO-U575ZI-Q: Figure 27. NUCLEO-144 The following pictures show how the X-NUCLEO-NFC07A1 expansion board can be stacked on a Nucleo 144 board: UM3235 - Rev 1 page 22/45 UM3235 STM32 configuration Steps Figure 28. X-NUCLEO-NFC07A1 stacked over NUCLEO-144 7.4.1 Overview The X-NUCLEO-NFC07A1 expansion board is using the following pins: • • • 2 pins for the I2C bus (Clock and Data) 3 pins for the LEDs 1 pin for the GPO (= General Purpose Output) They are connected to the following pins of the Arduino UNO connector: Figure 29. Connection of Arduino connector with X-NUCLEO-NFC07A1 The GPIOs of the Nucleo board should be configured to drive the I2C Bus, the GPO signal and the LEDs of the XNUCLEO-NFC07A1 expansion board. 7.4.2 Project Creation In STM32CubeMX, click on “Access to board selector”, select the board NUCLEO-U575ZI-Q and start a project : UM3235 - Rev 1 page 23/45 UM3235 STM32 configuration Steps Figure 30. Access to board selector Figure 31. Pinout and configuration tab 7.4.3 Import of X-CUBE-NFC7 software pack: In the Pinout & Configuration tab, click on Software packs -> Select component (NB: It is also possible to click on Middleware and Software packs -> X-CUBE-NFC7). Expand X-CUBE-NFC7 and select Device NFC7_Applications -> Application. Note: UM3235 - Rev 1 Click on the 2 icons circled in red to enable the information pane and the dependency pane: page 24/45 UM3235 STM32 configuration Steps Figure 32. Component Selector In this tutorial, we will use the NFC07A1_NDEF_URI example. Select this application in the drop down menu. At that step, some exclamation marks are shown to indicate some dependency problems. Click on “Resolve” to fix them. This will select the needed dependencies: Figure 33. Component Selection Click on OK button to validate. UM3235 - Rev 1 page 25/45 UM3235 STM32 configuration Steps 7.4.4 Configuration of X-CUBE-NFC7 In Middleware and Software packs, tick the following boxes: Figure 34. Modes and Configuration selection 7.4.5 Configuration of the I2C bus • Open the User Manual of the X-NUCLEO-NFC07A1 expansion board and search which signals of the Arduino connector are used for I2C Clock and Data (SCL and SDA). This is D15 (for I2C clock) and D14 (for I2C data): Figure 35. UM2860 (Table 2) UM3235 - Rev 1 page 26/45 UM3235 STM32 configuration Steps • Open the User Manual of the Nucleo board and seach for D14 and D15: Figure 36. UM2861 (Table 15) For this Nucleo board, they are connected to GPIOs PB8 and PB9. • In the Pinout view, select PB8 and connect it to an I2C Clock. In this example, we connect it to I2C1_SCL: Figure 37. I2C clock line selection UM3235 - Rev 1 page 27/45 UM3235 STM32 configuration Steps • In the Pinout view, select PB9 and connect it to an I2C Data. In this example, we connect it to I2C1_SDA: Figure 38. I2C Data line selection We get the following result: Figure 39. All the pins selected for use UM3235 - Rev 1 page 28/45 UM3235 STM32 configuration Steps • We should now configure the I2C bus (I2C1 in this example). Go to Connectivity -> I2C1 and set the configuration of this I2C bus: Figure 40. I2C Mode setting UM3235 - Rev 1 page 29/45 UM3235 STM32 configuration Steps • Go back to Middleware and Software packs -> X-CUBE-NFC7. In the Platform Settings, indicate the I2C bus to use to drive the NFC07A1 board: Figure 41. Platform Settings UM3235 - Rev 1 page 30/45 UM3235 STM32 configuration Steps 7.4.6 Configuration of the GPO • Open the User Manual of the X-NUCLEO-NFC07A1 expansion board and search which signal of the Arduino connector is connected to the GPO. This is D12: Figure 42. Pin Mapping from Arduino and MCU - UM2860 (Table 2) • Open the User Manual of the Nucleo board and search for D12: Figure 43. Pinout of the connectoe - UM2861 (Table 15) For this Nucleo board, D12 is connected to GPIO PA6. UM3235 - Rev 1 page 31/45 UM3235 STM32 configuration Steps • In the Pinout view, select PA6 and set it as GPIO External Interrupt (GPIO_EXTI6): Figure 44. External Interrupt Pin selection • In X-CUBE-NFC7 platform settings, configure NFC7 GPO PIN: Figure 45. Platform Setting UM3235 - Rev 1 page 32/45 UM3235 STM32 configuration Steps 7.4.7 Configuration of the LEDS • Open the User Manual of the X-NUCLEO-NFC07A1 expansion board and search which signals of the Arduino connector are connected to the LEDs. This is D2, D4, D5: Figure 46. LED Pins Selection - UM2860 (Table 2) LED1 is the Green LED, LED2 is the Blue LED and LED3 is the Yellow LED: Figure 47. LED Pins schematics • UM3235 - Rev 1 Open the User Manual of the Nucleo board and seach for D2, D4, D5: page 33/45 UM3235 STM32 configuration Steps Figure 48. Connector pinout - UM2861 (Table 18) For this Nucleo board, D2, D4, D5 are connected to GPIOs PF15, PF14 and PE11. • In the Pinout view, select PF14 and set it as GPIO_Output: Figure 49. GPIO_Output selection • UM3235 - Rev 1 Add a label to this output (for example “NFC07_LED2_BLUE”): page 34/45 UM3235 STM32 configuration Steps Figure 50. Entering user Label Figure 51. LED selection user Label • In X-CUBE-NFC7 platform settings, configure the blue led to map it to PF4 NFC07_LED2_BLUE: Figure 52. Blue LED selection UM3235 - Rev 1 page 35/45 UM3235 STM32 configuration Steps • UM3235 - Rev 1 Then do the same for the other LEDs. The X-NUCLEO-NFC07A1 expansion board is then ready to use. Generate the source code and build the project. page 36/45 UM3235 Generated Folders Structure 8 Generated Folders Structure When generating a project, two models of folders structure can be adopted when using a high level firmware component (i.e. a middleware in the STM32Cube MCU package): • • Basic Structure: the basic structure is often used with HAL examples and single package projects. This structure consists of having the IDE configuration folder in the same level as the sources (organized in Inc and Src subfolders). Advanced Structure: the advanced structure provides a more efficient and organized folders model that allows ease middleware applications integration when several packages are used. In the Advanced mode Src and Inc are generated under folder Core. For each package, the list of the generated files is under <Package_Name> (X-CUBE-NFC7 for the X-CUBENFC7 pack), at the same level as Core and containing inside the App and the Target subfolder. Figure 53. STM32CubeMX Application Structure Configuration UM3235 - Rev 1 page 37/45 UM3235 Known limitations and workarounds 9 Known limitations and workarounds STM32CubeMX NFC7 pack v1.0.0 is fully compatible with STM32CubeMX v 6.4.0 and upwards. It is not fully compatible with the previous version of STM32CubeMX (<= v 6.4.0). UM3235 - Rev 1 page 38/45 UM3235 References 10 References UM2961 User Manual - Getting started with the X-CUBE-NFC7 dynamic NFC/RFID tag IC software expansion for STM32Cube UM3235 - Rev 1 page 39/45 UM3235 Revision history Table 11. Document revision history UM3235 - Rev 1 Date Revision 04-Jun-2024 1 Changes Initial release. page 40/45 UM3235 Contents Contents 1 Acronyms and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 What is STM32Cube? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 License. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 4 Sample applications and examples description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.1 NFC07A1_NDEF_URI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.2 NFC07A1_NDEF_URI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.3 NFC07A1_GeneralPurposeOutput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.4 NFC07A1_I2CPROTECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.5 NFC07A1_Mailbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 Installing the X-CUBE-NFC7 pack in STM32CubeMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 Starting a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7 STM32 configuration Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 7.1 Use of NFC component without NDEF Library for X-NUCLEO-NFC07A1 . . . . . . . . . . . . . . . 11 7.2 Use of NDEF Library with sample applications for X-NUCLEO-NFC07A1 . . . . . . . . . . . . . . 12 7.3 Use of ST25DVXXKC component without sample applications for custom boards . . . . . . . 18 7.4 Porting of X-NUCLEO-NFC07A1 step by step guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.4.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.4.2 Project Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.4.3 Import of X-CUBE-NFC7 software pack: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.4.4 Configuration of X-CUBE-NFC7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.4.5 Configuration of the I2C bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.4.6 Configuration of the GPO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.4.7 Configuration of the LEDS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 8 Generated Folders Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 9 Known limitations and workarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38 10 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 List of tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 List of figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 UM3235 - Rev 1 page 41/45 UM3235 List of tables List of tables Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. List of acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Pinout scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 IPs/Component selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Pin selection for NUCLEO Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 I2C and Pin selection for NUCLEO Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 EXTI Line Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 VCOM configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Pinout and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Platform settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 VCOM /UART configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 UM3235 - Rev 1 page 42/45 UM3235 List of figures List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. Figure 30. Figure 31. Figure 32. Figure 33. Figure 34. Figure 35. Figure 36. Figure 37. Figure 38. Figure 39. Figure 40. Figure 41. Figure 42. Figure 43. Figure 44. Figure 45. Figure 46. Figure 47. Figure 48. Figure 49. Figure 50. Figure 51. Figure 52. UM3235 - Rev 1 Managing embedded software packs in STM32CubeMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Installing the X-CUBE-NFC7 pack in STM32CubeMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The X-CUBE-NFC7 pack in STM32CubeMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 STM32CubeMX main page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 STM32CubeMX MCU/Board Selector window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 STM32CubeMX Pinout & Configuration window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 STM32CubeMX Corresponding pack Components selection window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 STM32 Nucleo 64 and Nucleo 144 pins with X-NUCLEO-NFC07A1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 X-NUCLEO-NFC07A1 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 STM32CubeMX Corresponding pack Components selection window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 STM32CubeMX Pinout & Configuration tab and I2C settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 STM32CubeMX Corresponding pack Components selection window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 STM32CubeMX Pinout & Configuration tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_NDEF_URI applications 15 STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_I2CProtection example 15 STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_LowPowerDown example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 STM32CubeMX Pinout & Configuration tab and Additional pack settings for NFC07A1_Mailbox example. . . . . 16 STM32CubeMX NVIC Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 STM32CubeMX I2C Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 STM32CubeMX USART Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 STM32CubeMX Corresponding pack Components selection window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 STM32CubeMX Pinout & Configuration tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 STM32CubeMX Parameter Settings for a custom board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 STM32CubeMX NVIC Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 STM32CubeMX I2C Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 STM32CubeMX USART Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 NUCLEO-144 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 X-NUCLEO-NFC07A1 stacked over NUCLEO-144 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Connection of Arduino connector with X-NUCLEO-NFC07A1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Access to board selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Pinout and configuration tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Component Selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Component Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Modes and Configuration selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 UM2860 (Table 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 UM2861 (Table 15) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 I2C clock line selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 I2C Data line selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 All the pins selected for use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 I2C Mode setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Platform Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Pin Mapping from Arduino and MCU - UM2860 (Table 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Pinout of the connectoe - UM2861 (Table 15) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 External Interrupt Pin selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Platform Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 LED Pins Selection - UM2860 (Table 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 LED Pins schematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Connector pinout - UM2861 (Table 18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 GPIO_Output selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Entering user Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 LED selection user Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Blue LED selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 page 43/45 UM3235 List of figures Figure 53. UM3235 - Rev 1 STM32CubeMX Application Structure Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 page 44/45 UM3235 IMPORTANT NOTICE – READ CAREFULLY STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products. No license, express or implied, to any intellectual property right is granted by ST herein. Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product. ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces information previously supplied in any prior versions of this document. © 2024 STMicroelectronics – All rights reserved UM3235 - Rev 1 page 45/45 ">
/
Pobierz
Tylko małe przypomnienie. Możesz wyświetlić dokument tutaj. Ale co najważniejsze, nasza sztuczna inteligencja już go przeczytała. Może wyjaśnić złożone rzeczy w prosty sposób, odpowiedzieć na Twoje pytania w dowolnym języku i pomóc w szybkiej nawigacji nawet po najdłuższych lub najbardziej skomplikowanych dokumentach.
Reklama