微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > CC3200 GPIO 的配置问题

CC3200 GPIO 的配置问题

时间:10-02 整理:3721RD 点击:

如下是串口 IO的设置:

//
// Configure PIN_55 for UART0 UART0_TX
//
MAP_PinTypeUART(PIN_55, PIN_MODE_3);

//
// Configure PIN_57 for UART0 UART0_RX
//
MAP_PinTypeUART(PIN_57, PIN_MODE_3);

查到:

//*****************************************************************************
// Macros that can be used with PinConfigSet(), PinTypeGet(), PinStrengthGet()
//*****************************************************************************

#define PIN_MODE_0 0x00000000
#define PIN_MODE_1 0x00000001
#define PIN_MODE_2 0x00000002
#define PIN_MODE_3 0x00000003
#define PIN_MODE_4 0x00000004
#define PIN_MODE_5 0x00000005
#define PIN_MODE_6 0x00000006
#define PIN_MODE_7 0x00000007
#define PIN_MODE_8 0x00000008
#define PIN_MODE_9 0x00000009
#define PIN_MODE_10 0x0000000A
#define PIN_MODE_11 0x0000000B
#define PIN_MODE_12 0x0000000C
#define PIN_MODE_13 0x0000000D
#define PIN_MODE_14 0x0000000E
#define PIN_MODE_15 0x0000000F
// Note : PIN_MODE_255 is a dummy define for pinmux utility code generation
// PIN_MODE_255 should never be used in any user code.
#define PIN_MODE_255 0x000000FF

那到底模式3是什么模式呢? 其它的又是什么模式呢? 

--------------------------------------------------------------------------------------------------------------------------------------------------

还有, 我想弄个 Button应该怎么配置, 好像没有 Demo是用到 Button的!?

(没用过 TI的 ARM芯片, 有点模糊)

参考CC3200 Technical Reference Manual的Table 16-7

怪不得, 我从 GPIO那里找, 感觉还有很多不完善, 原来还有 PIN这一章。 (习惯了ST的, TI的变化很大)

这样每次配置 I/O口还要查询这个表格, 挺麻烦呀

不过, 再想想, GPIO的复用和重映射, 的确需要这样做

这些IO可以用ti pin mux tool 软件配置,还挺方便

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top