This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何使用PMAP配置P4.4为TA1.2

使用PMAP配置P2.4和P4.4为TA1.1和TA1.2功能配置电机,P2.4配置成功,出现了PWM波形,但是P4.4配置失败,想知道是什么原因:

  • 请问您现在使用的是哪个芯片/开发板?程序是您自己写的还是您修改的TI例程?
  • MSP432P401R   根具ti的例子改的

  • 请问具体是哪个例程呢?能否给出相关路径?我来测试一下
  • 用的是红的launchpad?
  • RobotArmmain.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    // RobotArmmain.c
    // Runs on MSP432
    // Basic test functionality for three-servo robot arm.
    // Daniel and Jonathan Valvano
    // November 16, 2018
    /* This example accompanies the books
    "Embedded Systems: Introduction to the MSP432 Microcontroller",
    ISBN: 978-1512185676, Jonathan Valvano, copyright (c) 2018
    "Embedded Systems: Real-Time Interfacing to the MSP432 Microcontroller",
    ISBN: 978-1514676585, Jonathan Valvano, copyright (c) 2018
    "Embedded Systems: Real-Time Operating Systems for ARM Cortex-M Microcontrollers",
    ISBN: 978-1466468863, , Jonathan Valvano, copyright (c) 2018
    For more information about my classes, my research, and my books, see
    http://users.ece.utexas.edu/~valvano/
    Simplified BSD License (FreeBSD License)
    Copyright (c) 2018, Jonathan Valvano, All rights reserved.
    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:
    1. Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
    AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
    USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    The views and conclusions contained in the software and documentation are
    those of the authors and should not be interpreted as representing official
    policies, either expressed or implied, of the FreeBSD Project.
    */
    // Negative logic bump sensors
    // P4.7 Bump5, left side of robot
    // P4.6 Bump4
    // P4.5 Bump3
    // P4.3 Bump2
    // P4.2 Bump1
    // P4.0 Bump0, right side of robot
    // The servos exceed the current limitation of standard USB, so when they
    // are in use, the system must be powered with a bench power supply or
    // the Pololu #3543 Motor Driver and Power Distribution Board.
    // Pololu #3543 Vreg (5V regulator output) connected to all three Pololu #136 GP2Y0A21YK0F Vcc's (+5V) and MSP432 +5V (J3.21)
    // Pololu #3543 Vreg (5V regulator output) connected to positive side of three 10 uF capacitors physically near the sensors
    // Pololu ground connected to all three Pololu #136 GP2Y0A21YK0F grounds and MSP432 ground (J3.22)
    // Pololu ground connected to negative side of all three 10 uF capacitors
    // MSP432 P9.0 (J5) (analog input to MSP432) connected to right GP2Y0A21YK0F Vout
    // MSP432 P6.1 (J3.23) (analog input to MSP432) connected to center GP2Y0A21YK0F Vout
    // MSP432 P9.1 (J5) (analog input to MSP432) connected to left GP2Y0A21YK0F Vout
    // Sever VCCMD=VREG jumper on Motor Driver and Power Distribution Board and connect VCCMD to 3.3V.
    // This makes P3.7 and P3.6 low power disables for motor drivers. 0 to sleep/stop.
    // Sever nSLPL=nSLPR jumper.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 这个您可以看一下数据手册

    http://www.ti.com/cn/lit/ds/symlink/msp432p401r.pdf 

    P4.4是不具备reconfigurable port mapping secondary function 这个功能的,也就是说是不可以进行重新配置port map的

    如下图所示

    建议您选用其他可以重新配置port map的引脚