(基于TI-RSLK)MSP432学习-02-硬件及书籍汇总(中文PDF)

连载目录:
01、CCS编译器安装及驱动库环境搭建
02、硬件及书籍汇总(中文PDF)
03、使用VS进行代码库函数编写,应用提示功能降低开发难度
04、GPIO输入输出省电模式及中断的应用
05、技术参考手册和驱动库中文资料

一、硬件

主控

主控板就是MSP432P401R LaunchPad(点击可查看官方介绍)

主要特性

  • 低功耗、高性能 MSP432P401R MCU
    – 带浮点单元和 DSP 加速功能的 48MHz 32 位 ARM Cortex M4F
    – 功耗:80uA/MHz 工作功耗和 660nA RTC 待机操作功耗
    – 数字:高级加密标准 (AES256) 加速器、CRC、DMA、32位硬件乘法器
    – 存储器:256KB 闪存、64KB RAM
    – 计时器:4 个 16 位、2 个 32 位
    – 通信:多达 4 个 I2C、8 个SPI、4 个 UART
  • 40 引脚 BoosterPack 连接器,支持 20 引脚 BoosterPack
  • 采用EnergyTrace+ 技术的板载 XDS-110ET 仿真器
  • 2 个按钮和 2 个 LCD,便于用户交互
  • 反向通道 UART 通过USB 连接到 PC

在这里插入图片描述

参考文档(中文PDF)

整理了一些PDF的文档资料,大家按需参考(部分为纯英文档)
更新:翻译了部分文档,达到了可读的程度!!zh_开头为翻译后的文档,建议和英文文档比较学习(首发)

下载地址:

整体

整体就是TI-RSLK的机器人系统学习套件,如下图:

重要:只有MSP432P401R LaunchPad主控并不会影响MSP432的学习,TI-RSLK的机器人系统学习套件并非必须!!!

在这里插入图片描述

主要特征

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

参考资料

二、 相关书籍

基于库函数(固件)

  • MSP432系列超低功耗ARM Cortex-M4微控制器原理与实践
    – 沈建华,张超,李晋 著
    – 出版社: 北京航空航天大学出版社
    – ISBN:9787512425071
    在这里插入图片描述
  • 基于固件的MSP432微控制器原理及应用
    –刘杰 著
    – 出版社: 北京航空航天大学出版社
    – ISBN:9787512421196
    在这里插入图片描述

基于寄存器

  • 基于ARM Cortex-M4F内核的MSP432 MCU开发实践
    – 叶国阳 刘铮 徐科军 著
    – 出版社: 机械工业出版社
    – ISBN:9787111587798
    在这里插入图片描述

下一篇:
03、使用VS进行代码库函数编写,应用提示功能降低开发难度

  • 19
    点赞
  • 69
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
MSP432 低功耗高性能并存10.1 Digital I/O Introduction The digital I/O features include: • Independently programmable individual I/Os • Any combination of input or output • Individually configurable interrupts for ports (available for certain ports only) • Independent input and output data registers • Individually configurable pullup or pulldown resistors • Wake-up capability from ultra-low power modes (available for certain ports only) • Individually configurable high drive I/Os (available for certain I/Os only) Devices within the family may have up to eleven digital I/O ports implemented (P1 to P10 and PJ). Most ports contain eight I/O lines; however, some ports may contain less (see the device-specific data sheet for ports available). Each I/O line is individually configurable for input or output direction, and each can be individually read or written. Each I/O line is individually configurable for pullup or pulldown resistors. Certain ports have interrupt and wake-up capability from ultra-low power modes (see device specific data sheet for ports with interrupt and wake-up capability). Each interrupt can be individually enabled and configured to provide an interrupt on a rising or falling edge of an input signal. All interrupts are fed into an encoded Interrupt Vector register, allowing the application to determine which sub-pin of a port has generated the event. Individual ports can be accessed as byte-wide ports or can be combined into half-word-wide ports. Port pairs P1 and P2, P3 and P4, P5 and P6, P7 and P8, and so on, are associated with the names PA, PB, PC, PD, and so on, respectively. All port registers are handled in this manner with this naming convention. The main exception are the interrupt vector registers, for example, interrupts for ports P1 and P2 must be handled through P1IV and P2IV, PAIV does not exist. When writing to port PA with half-word operations, all 16 bits are written to the port. When writing to the lower byte of port PA using byte operations,
下面是TI-RSLK循迹小车的代码: ```C++ #include <msp432p401r.h> #include <stdint.h> #define LEFT_FORWARD P2->OUT &= ~BIT4; P2->OUT |= BIT5 #define LEFT_REVERSE P2->OUT &= ~BIT5; P2->OUT |= BIT4 #define LEFT_STOP P2->OUT &= ~(BIT4 | BIT5) #define RIGHT_FORWARD P2->OUT &= ~BIT6; P2->OUT |= BIT7 #define RIGHT_REVERSE P2->OUT &= ~BIT7; P2->OUT |= BIT6 #define RIGHT_STOP P2->OUT &= ~(BIT6 | BIT7) #define BUTTON1 (P1->IN & BIT1) #define IR_THRESHOLD 15000 #define MAX_SPEED 25000 #define TURN_SPEED 20000 #define MIN_SPEED 10000 #define MAX_TURN_TIME 500000 volatile uint32_t left_speed, right_speed; volatile uint32_t left_count, right_count; volatile uint32_t last_left_count, last_right_count; volatile uint32_t left_turn_time, right_turn_time; volatile uint32_t count; void SysTick_Handler(void) { left_count = TIMER_A0->R; right_count = TIMER_A1->R; left_speed = (last_left_count - left_count) * 1000 / 33; right_speed = (last_right_count - right_count) * 1000 / 33; last_left_count = left_count; last_right_count = right_count; count++; } void delay(uint32_t time) { volatile uint32_t i; for (i = 0; i < time; i++); } void turn_left(void) { LEFT_REVERSE; RIGHT_FORWARD; delay(left_turn_time); LEFT_FORWARD; RIGHT_FORWARD; } void turn_right(void) { LEFT_FORWARD; RIGHT_REVERSE; delay(right_turn_time); LEFT_FORWARD; RIGHT_FORWARD; } int main(void) { WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; P1->SEL0 &= ~BIT1; P1->SEL1 &= ~BIT1; P1->DIR &= ~BIT1; P1->REN |= BIT1; P1->OUT |= BIT1; P2->DIR |= BIT4 | BIT5 | BIT6 | BIT7; P2->OUT &= ~(BIT4 | BIT5 | BIT6 | BIT7); SysTick_Config(SystemCoreClock / 1000); TIMER_A0->CTL = TIMER_A_CTL_SSEL__SMCLK | TIMER_A_CTL_MC__CONTINUOUS | TIMER_A_CTL_IE; TIMER_A0->CCTL[0] = TIMER_A_CCTLN_CM__NONE | TIMER_A_CCTLN_CCIS__CCIA | TIMER_A_CCTLN_CCIE; TIMER_A1->CTL = TIMER_A_CTL_SSEL__SMCLK | TIMER_A_CTL_MC__CONTINUOUS | TIMER_A_CTL_IE; TIMER_A1->CCTL[0] = TIMER_A_CCTLN_CM__NONE | TIMER_A_CCTLN_CCIS__CCIA | TIMER_A_CCTLN_CCIE; left_turn_time = MAX_TURN_TIME; right_turn_time = MAX_TURN_TIME; while (1) { if (BUTTON1 == 0) { while (BUTTON1 == 0); if (left_turn_time == MAX_TURN_TIME) { left_turn_time = MIN_SPEED; right_turn_time = TURN_SPEED; } else { left_turn_time = MAX_TURN_TIME; right_turn_time = MAX_TURN_TIME; } } if (count >= 100) { count = 0; if (left_speed > IR_THRESHOLD && right_speed > IR_THRESHOLD) { LEFT_FORWARD; RIGHT_FORWARD; } else if (left_speed < IR_THRESHOLD && right_speed > IR_THRESHOLD) { turn_left(); } else if (left_speed > IR_THRESHOLD && right_speed < IR_THRESHOLD) { turn_right(); } else { LEFT_STOP; RIGHT_STOP; } } } } ``` 这个代码实现了循迹小车的基本功能,包括前进、左转、右转和停止。在代码中,使用了两个定时器(TIMER_A0和TIMER_A1)来计算左右轮子的速度,然后根据红外传感器的数据来控制小车的行动。同时,代码还支持手动控制小车的转向,只需要按下P1.1的按钮即可。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值