ST / X_NUCLEO_IDB0XA1

Dependents:   Nucleo_Zumo_BLE_IDB04A1 contest_IOT5 contest_IOT6 contest_IOT_10 ... more

Fork of X_NUCLEO_IDB0XA1 by ST Expansion SW Team

Arduino Connector Compatibility Warning

X-NUCLEO-IDB04A1 and X-NUCLEO-IDB05A1 are Arduino compatible with an exception: instead of using pin D13 for the SPI clock, they use pin D3. The default configuration for this library is having the SPI clock on pin D3.

To be fully Arduino compatible, X-NUCLEO-IDB04A1 and X-NUCLEO-IDB05A1 need a small HW patch.

For X-NUCLEO-IDB04A1 this patch consists in removing zero resistor R10 and instead soldering zero resistor R11. For X-NUCLEO-IDB05A1 this patch consists in removing zero resistor R4 and instead soldering zero resistor R6.

In case you patch your board, then you also have to configure this library to use pin D13 to drive the SPI clock (see macro IDB0XA1_D13_PATCH in file x_nucleo_idb0xa1_targets.h).

If you use pin D13 for the SPI clock, please be aware that on STM32 Nucleo boards you may not drive the LED, otherwise you will get a conflict: the LED on STM32 Nucleo boards is connected to pin D13.

Referring to the current list of tested platforms (see X-NUCLEO-IDB04A1 and X-NUCLEO-IDB05A1 pages), the patch is required by ST-Nucleo-F103RB; ST-Nucleo-F302R8; ST-Nucleo-F411RE; and ST-Nucleo-F446RE.

Committer:
Wolfgang Betz
Date:
Tue Oct 06 14:25:08 2015 +0200
Revision:
130:770ce14d3d15
Include mbed-classic version

Derived from
- repo (on Codex): gitolite@codex.cro.st.com:x-nucleodev/X-NUCLEO-IKC01A1-MBED.git
- branch: ble_wb
- SHA1 ID: 5ccc73e35868169e42132c0d1c056f908a6d70c0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 130:770ce14d3d15 1 /**
Wolfgang Betz 130:770ce14d3d15 2 ******************************************************************************
Wolfgang Betz 130:770ce14d3d15 3 * @file debug.h
Wolfgang Betz 130:770ce14d3d15 4 * @author CL
Wolfgang Betz 130:770ce14d3d15 5 * @version V1.0.0
Wolfgang Betz 130:770ce14d3d15 6 * @date 04-July-2014
Wolfgang Betz 130:770ce14d3d15 7 * @brief This file defines print functions for debug purposes.
Wolfgang Betz 130:770ce14d3d15 8 ******************************************************************************
Wolfgang Betz 130:770ce14d3d15 9 * @attention
Wolfgang Betz 130:770ce14d3d15 10 *
Wolfgang Betz 130:770ce14d3d15 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Wolfgang Betz 130:770ce14d3d15 12 *
Wolfgang Betz 130:770ce14d3d15 13 * Redistribution and use in source and binary forms, with or without modification,
Wolfgang Betz 130:770ce14d3d15 14 * are permitted provided that the following conditions are met:
Wolfgang Betz 130:770ce14d3d15 15 * 1. Redistributions of source code must retain the above copyright notice,
Wolfgang Betz 130:770ce14d3d15 16 * this list of conditions and the following disclaimer.
Wolfgang Betz 130:770ce14d3d15 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Wolfgang Betz 130:770ce14d3d15 18 * this list of conditions and the following disclaimer in the documentation
Wolfgang Betz 130:770ce14d3d15 19 * and/or other materials provided with the distribution.
Wolfgang Betz 130:770ce14d3d15 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Wolfgang Betz 130:770ce14d3d15 21 * may be used to endorse or promote products derived from this software
Wolfgang Betz 130:770ce14d3d15 22 * without specific prior written permission.
Wolfgang Betz 130:770ce14d3d15 23 *
Wolfgang Betz 130:770ce14d3d15 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Wolfgang Betz 130:770ce14d3d15 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Wolfgang Betz 130:770ce14d3d15 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Wolfgang Betz 130:770ce14d3d15 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Wolfgang Betz 130:770ce14d3d15 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Wolfgang Betz 130:770ce14d3d15 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Wolfgang Betz 130:770ce14d3d15 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Wolfgang Betz 130:770ce14d3d15 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Wolfgang Betz 130:770ce14d3d15 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Wolfgang Betz 130:770ce14d3d15 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wolfgang Betz 130:770ce14d3d15 34 *
Wolfgang Betz 130:770ce14d3d15 35 ******************************************************************************
Wolfgang Betz 130:770ce14d3d15 36 */
Wolfgang Betz 130:770ce14d3d15 37
Wolfgang Betz 130:770ce14d3d15 38 /* Define to prevent recursive inclusion -------------------------------------*/
Wolfgang Betz 130:770ce14d3d15 39 #ifndef __DEBUG_H
Wolfgang Betz 130:770ce14d3d15 40 #define __DEBUG_H
Wolfgang Betz 130:770ce14d3d15 41
Wolfgang Betz 130:770ce14d3d15 42 #ifdef __cplusplus
Wolfgang Betz 130:770ce14d3d15 43 extern "C" {
Wolfgang Betz 130:770ce14d3d15 44 #endif
Wolfgang Betz 130:770ce14d3d15 45
Wolfgang Betz 130:770ce14d3d15 46 /* Includes ------------------------------------------------------------------*/
Wolfgang Betz 130:770ce14d3d15 47 #include <string.h>
Wolfgang Betz 130:770ce14d3d15 48
Wolfgang Betz 130:770ce14d3d15 49 /* Exported macro ------------------------------------------------------------*/
Wolfgang Betz 130:770ce14d3d15 50 //#define DEBUG
Wolfgang Betz 130:770ce14d3d15 51 #ifdef DEBUG
Wolfgang Betz 130:770ce14d3d15 52 #include <stdio.h>
Wolfgang Betz 130:770ce14d3d15 53 #define PRINTF(...) printf(__VA_ARGS__)
Wolfgang Betz 130:770ce14d3d15 54 #else
Wolfgang Betz 130:770ce14d3d15 55 #define PRINTF(...)
Wolfgang Betz 130:770ce14d3d15 56 #endif
Wolfgang Betz 130:770ce14d3d15 57
Wolfgang Betz 130:770ce14d3d15 58 /* Print the data travelling over the SPI in the .csv format for the GUI*/
Wolfgang Betz 130:770ce14d3d15 59 //#define PRINT_CSV_FORMAT
Wolfgang Betz 130:770ce14d3d15 60 #ifdef PRINT_CSV_FORMAT
Wolfgang Betz 130:770ce14d3d15 61 #include <stdio.h>
Wolfgang Betz 130:770ce14d3d15 62 #define PRINT_CSV(...) printf(__VA_ARGS__)
Wolfgang Betz 130:770ce14d3d15 63 #else
Wolfgang Betz 130:770ce14d3d15 64 #define PRINT_CSV(...)
Wolfgang Betz 130:770ce14d3d15 65 #endif
Wolfgang Betz 130:770ce14d3d15 66
Wolfgang Betz 130:770ce14d3d15 67 #ifdef __cplusplus
Wolfgang Betz 130:770ce14d3d15 68 }
Wolfgang Betz 130:770ce14d3d15 69 #endif
Wolfgang Betz 130:770ce14d3d15 70
Wolfgang Betz 130:770ce14d3d15 71 #endif /* __DEBUG_H */
Wolfgang Betz 130:770ce14d3d15 72
Wolfgang Betz 130:770ce14d3d15 73 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/