Example Program for EVAL-AD7606
Dependencies: platform_drivers
app_config_mbed.h
00001 /***************************************************************************//** 00002 * @file app_config_mbed.h 00003 * @brief Header file for Mbed platform configurations 00004 ******************************************************************************** 00005 * Copyright (c) 2021 Analog Devices, Inc. 00006 * All rights reserved. 00007 * 00008 * This software is proprietary to Analog Devices, Inc. and its licensors. 00009 * By using this software you agree to the terms of the associated 00010 * Analog Devices Software License Agreement. 00011 *******************************************************************************/ 00012 00013 #ifndef APP_CONFIG_MBED_H_ 00014 #define APP_CONFIG_MBED_H_ 00015 00016 /******************************************************************************/ 00017 /***************************** Include Files **********************************/ 00018 /******************************************************************************/ 00019 00020 #include <stdint.h> 00021 #include <PinNames.h> 00022 00023 #include "uart_extra.h" 00024 #include "irq_extra.h" 00025 #include "spi_extra.h" 00026 00027 /******************************************************************************/ 00028 /********************** Macros and Constants Definition ***********************/ 00029 /******************************************************************************/ 00030 00031 /* Pin mapping of SDP-K1 w.r.t Arduino connector */ 00032 #define SPI_CSB D10 00033 #define SPI_HOST_SDO D11 00034 #define SPI_HOST_SDI D12 00035 #define SPI_SCK D13 00036 00037 /* Common pin mapping on SDP-K1 */ 00038 #define UART_TX USBTX 00039 #define UART_RX USBRX 00040 #define LED_GPO LED3 00041 00042 /* Pin mapping w.r.t. target */ 00043 #define OSR0_PIN D1 00044 #define OSR1_PIN D2 00045 #define OSR2_PIN D4 00046 #define RESET_PIN D5 00047 #define CONVST_PIN D6 00048 #define BUSY_PIN D7 00049 #define RANGE_PIN D8 00050 #define STDBY_PIN D9 00051 00052 /* Pins used to trigger and/or read a new (periodic) conversion event */ 00053 #define PWM_TRIGGER D3 00054 #define INT_EVENT D3 00055 00056 /* Define the max possible sampling (or output data) rate for a given platform. 00057 * This is also used to find the time period to trigger a periodic conversion event. 00058 * Note: Max possible ODR is 32KSPS per channel for continuous data capture on 00059 * IIO client. This is derived by testing the firmware on SDP-K1 controller board 00060 * @22Mhz SPI clock. The max possible ODR can vary from board to board and 00061 * data continuity is not guaranteed above this ODR on IIO oscilloscope */ 00062 #define SAMPLING_RATE (32000) 00063 #define CONV_TRIGGER_PERIOD_NSEC (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000) 00064 #define CONV_TRIGGER_DUTY_CYCLE_NSEC (CONV_TRIGGER_PERIOD_NSEC / 2) 00065 00066 /******************************************************************************/ 00067 /********************** Public/Extern Declarations ****************************/ 00068 /******************************************************************************/ 00069 00070 extern mbed_irq_init_param mbed_ext_int_extra_init_params; 00071 extern mbed_uart_init_param mbed_uart_extra_init_params; 00072 extern mbed_spi_init_param mbed_spi_extra_init_params; 00073 00074 #endif /* APP_CONFIG_MBED_H_ */
Generated on Wed Jul 13 2022 11:55:04 by 1.7.2