Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all 22203 articles
Browse latest View live

MSP430FR6989: Generating 2us pulse signal for SINGLE-WIRE communication protocol

$
0
0

Part Number:MSP430FR6989

Hi Everyone,

I am referring to this single-wire interface solution posted on TI-website::  http://www.ti.com/lit/an/slaa768/slaa768.pdf

The above solution is based on MSP430FR2XXX devices.

The issue I have is the slave-device communication with MSP430FR6989 has LOGIC-1 pulse width of 2uS and LOGIC-0 pulse-width of 10uS. Generating a pulse-width of 2us is the challenge here.

I have tried GPIO bit-banging and the pulse widths I am seeing is 3.5uS.

Is there a way I can generate the pulse width of 2uS using the bit-banging and/or using TIMERS?

Would really appreciate your feedback and support.


MSP430G2553: MSP430G2553

$
0
0

Part Number:MSP430G2553

Hello, I have sensor that measures plasma current of ionosphere. This sensor is biased with ramp signal which hav 1 Hz frequency. At positive voltage bias, sensor collect electron current, on the other hand at negative voltage bias sensor collect positive ion current. At the end of the story I will obtain I-V curve (in some way voltage sweeping). My question is can I use MSP430G2553 internal 10 Bit ADC for reading current that colleting from sensor. This I-V curve is very similar to diode I-V characteristic. Thank you all for answering my question.

Compiler/MSP430F5131: Simple C question

$
0
0

Part Number:MSP430F5131

Tool/software: TI C/C++ Compiler

I still struggle with seldom-used C "logical" statements -

for speed faster than using an ISR, I want to spin on an interrupt flag for port P1.2 until it becomes a "1"

What's the proper syntax;  While (~P1IV & 0x40) doesn't seem to do it - do I need a semicolon, braces, or some other inversion like ! or what?

Thx for some add'l education!

MSP430F5529: MQTT Memory & Code Footprint

$
0
0

Part Number:MSP430F5529

Hi team,

I can see from the processor wiki that the memory and code footprint of MQTT on MSP430F5529 is 7kB RAM and 44kB Flash. Could you please help me understand why so much memory is needed? Thanks!

Regards,

Brian Angiel

RTOS/SIMPLELINK-MSP432-SDK: Low Power Mode when no task active (move from TI-RTOS to SimpleLink/POSIX)

$
0
0

Part Number:SIMPLELINK-MSP432-SDK

Tool/software:TI-RTOS

I am porting firmware from TI-RTOS to SimpleLink / POSIX API (with TI-RTOS as underlying RTOS).

In TI-RTOS before impleLink, you could configure that when no task was running, an idle task would run and move the controller to a lower power level (via the TI-RTOS configuration GUI).
Is that same functionality available in SimpleLink for MSP432?

Asking for this exercise on element14 community blog series:

MSP430FR5989: Analog port input leakage current

$
0
0

Part Number:MSP430FR5989

Team,

I am trying to determine the input leakage on a pin for the M430FR5989 when configured to analog port. I see that the digital input ports have a leakage current of +/- 20nA, but I could not find data for info on leakage / input current when configured to analog. Can I assume the same value as the digital input current? Or is there a different input current? Any help would be appreciated.

CCS/MSP-EXP430F5438: Demo program loads but lose control after letting it GO

$
0
0

Part Number:MSP-EXP430F5438

Tool/software: Code Composer Studio

Now I can build and load the code UserExperienceDemo, and single-step. But if I let it go, there is no apparent action e.g. the LCD display does not display anything. Then I can't stop it, getting this message when I try attached below.

But I have a simple toggle-discrete (blink LED) program that I I can load, run, and stop, proving there is no fundamental infrastructure issue. (Although occasionally it won't load, giving a popup message "Error connecting to target: Unknown device." Any hints on this also appreciated. If I exit CCS, pull the ubs cable, and start over, then it works again.)

My board is version 0-04 while the documentation assumes 0-02. Don't know if this matters or not.

Tim

CCS/MSP430G2553: i2c Question

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

Hello,

I am using the sample code in MSP for Slave device. Here in the code it enters LPM0. Is There any way I can use this code without entering into Low power mode and it can do its task continuously and responds only when master sends a read or write command.

Thanks

Sagar Shah(Please visit the site to view this file)


MSP430F5329: ADC12SHSx Where do I find the clocks referenced?

$
0
0

Part Number:MSP430F5329

In MSP430x5xx and MSP430x6xx Family User's Guide (SLAU208P) Paragraph 28.3.2 ADC12CTL1 Register 

Bits 11-10 ADC12SHSx It says 

00b = ADC12SC bit

01b = Timer source (see device-specific data sheet for exact timer and locations)

10b = Timer source (see device-specific data sheet for exact timer and locations)

10b = Timer source (see device-specific data sheet for exact timer and locations)

I did a search through SLAS678D MSP430F532x to try to find those timers. 

   I searched for ADC12CTL1 and could only find the address of the register. 

   I searched for ADC12SHS and found references for output pins in page 23, and 26

There is no mention on page 26 which says to go to Family Reference (SLAU208P)

The no mention in 12-Bit ADC, Timing Parameters Page 61

So then I went to io430f5329.h to see if it was in the include file. No.You use :

#define ADC12SHS0_H (0x0004u) /* ADC12 Sample/Hold Source Bit: 0 */

#define ADC12SHS1_H (0x0008u) /* ADC12 Sample/Hold Source Bit: 1 */

#define ADC12SHS_0 (0*0x400u) /* ADC12 Sample/Hold Source: 0 */
#define ADC12SHS_1 (1*0x400u) /* ADC12 Sample/Hold Source: 1 */
#define ADC12SHS_2 (2*0x400u) /* ADC12 Sample/Hold Source: 2 */
#define ADC12SHS_3 (3*0x400u) /* ADC12 Sample/Hold Source: 3 */


On other variables you do:

#define RTCSSEL__ACLK (0x0000u) /* RTC Source Select ACLK */
#define RTCSSEL__SMCLK (0x0400u) /* RTC Source Select SMCLK */
#define RTCSSEL__RT1PS (0x0800u) /* RTC Source Select RT1PS */

or

#define TASSEL__TACLK (0*0x100u) /* Timer A clock source select: 0 - TACLK */
#define TASSEL__ACLK (1*0x100u) /* Timer A clock source select: 1 - ACLK */
#define TASSEL__SMCLK (2*0x100u) /* Timer A clock source select: 2 - SMCLK */
#define TASSEL__INCLK (3*0x100u) /* Timer A clock source select: 3 - INCLK */

#define TBSSEL__TBCLK (0*0x100u) /* Timer0_B7 clock source select: 0 - TBCLK */
#define TBSSEL__TACLK (0*0x100u) /* Timer0_B7 clock source select: 0 - TBCLK (legacy) */
#define TBSSEL__ACLK (1*0x100u) /* Timer0_B7 clock source select: 1 - ACLK */
#define TBSSEL__SMCLK (2*0x100u) /* Timer0_B7 clock source select: 2 - SMCLK */
#define TBSSEL__INCLK (3*0x100u) /* Timer0_B7 clock source select: 3 - INCLK */

etc...

So then I went to the driverlib. 

And found:

//*****************************************************************************
//
// The following are values that can be passed to the
// sampleHoldSignalSourceSelect parameter for functions: ADC12_A_init().
//
//*****************************************************************************
#define ADC12_A_SAMPLEHOLDSOURCE_SC (ADC12SHS_0)
#define ADC12_A_SAMPLEHOLDSOURCE_1 (ADC12SHS_1)
#define ADC12_A_SAMPLEHOLDSOURCE_2 (ADC12SHS_2)
#define ADC12_A_SAMPLEHOLDSOURCE_3 (ADC12SHS_3)

So again nothing defined. 

ADC12SHSx Where do I find the clocks referenced for those two bits? 

I am out of ideas. 


MSP432P401R: Program goes wrong

$
0
0

Part Number:MSP432P401R

Hi,

We design our application with MSP432P401R, and have manufactured about 400 PCBAs, 2 of which act abnormally. We design to shutdown the PCBA with letting the chip go to LPM3, and wake it up with a Pushbutton interrupt. But the 2 PCBAs haven't done that.

I debug my program using the MSP-EXP432P401R as the XDS110 debugger in CCS6.1.3. Section of my "shutdown code" is as follows:

MAP_CS_initClockSignal(CS_MCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1);
MAP_CS_initClockSignal(CS_SMCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1);
MAP_CS_initClockSignal(CS_HSMCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); MAP_CS_initClockSignal(CS_ACLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); MAP_CS_initClockSignal(CS_BCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); BITBAND_PERI(CS->CTL2, CS_CTL2_HFXT_EN_OFS) = 0; PJSEL0 &= ~0x0C; PJSEL0 |= 0x03; PJSEL1 &= ~0x0F; PJDIR |= 0x0C; PJOUT &= ~0x0C; RTC_C->CTL0 = RTCKEY; BITBAND_PERI(RTC_C->CTL0, RTCTEVIE_OFS) = 0; BITBAND_PERI(RTC_C->CTL0, RTCKEY_OFS) = 0; MAP_GPIO_registerInterrupt(GPIO_PORT_P5,PM_ULPStartIntHandler); MAP_Interrupt_enableInterrupt(INT_PORT5); if(AlarmEnabled == true) { MAP_RTC_C_enableInterrupt(RTC_C_CLOCK_ALARM_INTERRUPT); MAP_Interrupt_enableInterrupt(45); } else { MAP_RTC_C_disableInterrupt(RTC_C_CLOCK_ALARM_INTERRUPT); } BITBAND_PERI(P5IFG,3) = 0; BITBAND_PERI(P5IE,3) = 1; Interrupt_enableSleepOnIsrExit(); while(1) { MAP_PCM_gotoLPM3(); __no_operation(); }

where the  GPIO P5.3 is the pushbutton signal.

I set a breakpoint at the "while(1)" line, but the program won't get there at most tries (sometimes it will). When I suspend the running in CCS, there will be 2 cases. 

1. The program goes to an unexpected address, and CCS shows the following error:

and the "no source available" address is not the same from different tries. Some other address, such as 0x2260e4, 0x150d8c, may appear. 

2. The program stops in the CPU_wfi() function in driverlib.c. As I resume the program running, it will get the breakpoint at the "while(1)" line, but if I continue to run the program, there will always be a disconnection from the debugger with the following error:

CORTEX_M4_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. Reset the device, and retry the
operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower
TCLK). (Emulation package 6.0.222.0)
CORTEX_M4_0: JTAG Communication Error: (Error -614 @ 0x0) The target indicates there is an error condition from a previous SWD
request. Clear the error the condition, and try the SWD request again. (Emulation package 6.0.222.0) Reset the device to factory
settings?

If the program can get the "while(1)" line and enter LPM3, it will also go to an unexpected address in the Pushbutton ISR.

As only 2 of 400 PCBAs have such problem. I guess it's not a software fault, but I'm not sure. How can I figure it up?

MSP430FR2111: LPM Test code with Assembly_IAR

$
0
0

Part Number:MSP430FR2111

Hello all

I need LPM test code with Assembly_IAR,there is only LPM3 mode in ti.com.

RTOS/MSP432P4011: MSP432P4 2.10.00.14 UART driver race conditions (read/write)

$
0
0

Part Number:MSP432P4011

Tool/software:TI-RTOS

Hi,

I've found two bugs in the UARTMSP432 driver that result in missed callbacks and effectively kill communication.

First bug: If the driver is configured for UART_MODE_BLOCKING and UART_DATA_BINARY, then there's a race condition with drainByISR in readTaskCallback. I've annotated the function with comments (1), (2), and (3) that describe the issue below.

static int readTaskCallback(UART_Handle handle)
{
    bool               makeCallback = false;
    unsigned char      readIn;
    unsigned char     *bufferEnd;
    uintptr_t          key;
    UARTMSP432_Object *object = handle->object;
    size_t             tempCount;

    // (1) Don't handle by interrupt because we're processing anyway.
    object->state.drainByISR = false;
    bufferEnd = (unsigned char*) object->readBuf + object->readSize;

    while (object->readCount) {
        if (RingBuf_get(&object->ringBuffer, &readIn) < 0) {
            break;
        }

        DebugP_log2("UART:(%p) read '0x%02x'",
            ((UARTMSP432_HWAttrsV1 const *)(handle->hwAttrs))->baseAddr,
            (unsigned char) readIn);

        *(unsigned char *) (bufferEnd - object->readCount *
            sizeof(unsigned char)) = readIn;

        key = HwiP_disable();

        object->readCount--;

        HwiP_restore(key);

        if ((object->state.readDataMode == UART_DATA_TEXT) &&
            (object->state.readReturnMode == UART_RETURN_NEWLINE) &&
            (readIn == '\n')) {
            makeCallback = true;
            break;
        }
    }

    // (2) check if callback should be called
    if (!object->readCount || makeCallback) {
        tempCount = object->readSize;
        object->readSize = 0;
        object->readCallback(handle, object->readBuf,
            tempCount - object->readCount);
    }
    else {
        // (3)
        // If we receive interrupt here that would complete a read (e.g read of n bytes and we have
        // buffered n-1), then the interrupt will not call the callback because of (1) and we won't
        // call it because of (2). If not subsequent bytes are received, the callback will never be
        // called.
        object->state.drainByISR = true;
    }

    return (0);
}

The fix is fairly simple, something like below should work, but I haven't tested because I can't build the drivers myself.

    // Unchanged above.

    key = HwiP_disable();
    makeCallback |= !object->readCount;
    if (!makeCallback) {
        object->state.drainByISR = true;
    }
    HwiP_restore(key);

    if (makeCallback) {
        tempCount = object->readSize;
        object->readSize = 0;
        object->readCallback(handle, object->readBuf,
            tempCount - object->readCount);
    }
    
    return (0);
}

The second bug causes a write callback not to be called because the way the driver checks for an outstanding write is incorrect. UARTMSP432_write checks for a pending write by checking if object->writeCount is zero or not. However, writeData decrements this value before the character has finished being written:

MAP_UART_transmitData(hwAttrs->baseAddr, *writePtr);
object->writeCount--;

The callback is later called from the Hwi:

 if (txcptEnabled &&
                (status & EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT_FLAG)) {
            /* The TX complete interrupt for the last byte. */

            MAP_UART_disableInterrupt(hwAttrs->baseAddr,
                    EUSCI_A_UART_TRANSMIT_INTERRUPT);
            MAP_UART_disableInterrupt(hwAttrs->baseAddr,
                    EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT);
            clearTXCPTIFG(hwAttrs->baseAddr);
#if DeviceFamily_ID == DeviceFamily_ID_MSP432P401x
            Power_releaseConstraint(PowerMSP432_DISALLOW_DEEPSLEEP_0);
#endif
            Power_releaseConstraint(PowerMSP432_DISALLOW_PERF_CHANGES);

            object->writeCallback((UART_Handle)arg, (void *) object->writeBuf,
                    object->writeSize);
        }

However, if you attempt to do UART_write between writeCount being decremented and the Hwi being signalled, then there is no error reported, and the write is accepted. The Hwi will then continue to write the new data, while never acknowledging the completion of the previous transaction. It's easy to work around this, but I feel if UART_write returns no error (e.g. busy), then you should expect a callback sometime in the future.

Hope that makes sense, feel free to clarify. I would like to get these fixed in the next release if possible :)

Thanks

Campbell

WEBENCH® Tools/MSP430FR2311: IAR Embeded Worbench

$
0
0

Part Number:MSP430FR2311

Tool/software: WEBENCH® Design Tools

I am using MSP430FR2311 and want to creat a arithmetic library file, my question is how to creat a lib file in IAR Embeded Workbench?

And how to define the input or output variables?

EVM430-FR6047: Unable to make the board work

$
0
0

Part Number:EVM430-FR6047

Hello,

I have received my EVM430-FR6047 yesterday but I am still unable to make it work. I using 1 MHz transducers and as far as configuration goes I using the default as it seemed fine. Physically I am connecting to the board as shown in the picture. I am getting no data in the GUI. I have probed my oscilloscope on J8 and unable to get the pulses as well. Is there anyway to debug?

MSP-GANG: MSP GANG programmer “Vcc is too low”

$
0
0

Part Number:MSP-GANG

MSP Gang is failed during programing PCBA(PCBA is powered by MSP GANG, no external power ) and showed 'Vcc is too low" on screen. PCBA can be reprogramed by change a new MSP GANG programmer.

Sleftest found errors as below report, and the MSP GANG programmer is damaged during programing. Please help to identify why it's damaged, what's the possible roortcause? thanks.

Sleftest report

=== MSP-GANG Self test results ( Monday, May 14, 2018, 18:34:37 ) ===

Adapter SN ------: 14122508
Hardware --------: G430: 01.02
Access key ------: MSP-GANG Programmer
Silicon Number --: E427 1147 1000 0900
API Firmware ----: MSP-Gang A430: 01.02.06.00
BOOT Firmware ---: G430BOOT B430: 01.00.02.00
GUI Software ----: MSP-Gang-GUI G430: 01.02.06.00
DLL Software ----: MSP-Gang-DLL D430: 01.02.06.00

================ Test results =============


No. name parameter limits result status


1: Data Bus (ALL LOW) 0x0000 (0x0000 - 0x0000) Result: 0x00 ... >> OK <<
2: Data Bus (ALL HIGH) 0x00FF (0xFFFF - 0xFFFF) Result: 0xFFFF ... >> OK <<
3: Data Bus (D-0 HI ) 0x0001 (0x0101 - 0x0101) Result: 0x0101 ... >> OK <<
4: Data Bus (D-1 HI ) 0x0002 (0x0202 - 0x0202) Result: 0x0202 ... >> OK <<
5: Data Bus (D-2 HI ) 0x0004 (0x0404 - 0x0404) Result: 0x0404 ... >> OK <<
6: Data Bus (D-3 HI ) 0x0008 (0x0808 - 0x0808) Result: 0x0808 ... >> OK <<
7: Data Bus (D-4 HI ) 0x0010 (0x1010 - 0x1010) Result: 0x1010 ... >> OK <<
8: Data Bus (D-5 HI ) 0x0020 (0x2020 - 0x2020) Result: 0x2020 ... >> OK <<
9: Data Bus (D-6 HI ) 0x0040 (0x4040 - 0x4040) Result: 0x4040 ... >> OK <<
10: Data Bus (D-7 HI ) 0x0080 (0x8080 - 0x8080) Result: 0x8080 ... >> OK <<

11: Data-2 Bus (ALL LOW) 0x0000 (0x0000 - 0x0000) Result: 0x00 ... >> OK <<
12: Data-2 Bus (ALL HIGH) 0x00FF (0xFFFF - 0xFFFF) Result: 0xFFFF ... >> OK <<
13: Data-2 Bus (D2-0 HI ) 0x0001 (0x0101 - 0x0101) Result: 0x0101 ... >> OK <<
14: Data-2 Bus (D2-1 HI ) 0x0002 (0x0202 - 0x0202) Result: 0x0202 ... >> OK <<
15: Data-2 Bus (D2-2 HI ) 0x0004 (0x0404 - 0x0404) Result: 0x0404 ... >> OK <<
16: Data-2 Bus (D2-3 HI ) 0x0008 (0x0808 - 0x0808) Result: 0x0808 ... >> OK <<
17: Data-2 Bus (D2-4 HI ) 0x0010 (0x1010 - 0x1010) Result: 0x1010 ... >> OK <<
18: Data-2 Bus (D2-5 HI ) 0x0020 (0x2020 - 0x2020) Result: 0x2020 ... >> OK <<
19: Data-2 Bus (D2-6 HI ) 0x0040 (0x4040 - 0x4040) Result: 0x4040 ... >> OK <<
20: Data-2 Bus (D2-7 HI ) 0x0080 (0x8080 - 0x8080) Result: 0x8080 ... >> OK <<

21: Vcc Target-1 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 1.59 V ... >> ERROR <<
22: Vcc Target-2 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 3.02 V ... >> ERROR <<
23: Vcc Target-3 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 0.02 V ... >> OK <<
24: Vcc Target-4 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 0.01 V ... >> OK <<
25: Vcc Target-5 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 0.01 V ... >> OK <<
26: Vcc Target-6 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 0.01 V ... >> OK <<
27: Vcc Target-7 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 0.01 V ... >> OK <<
28: Vcc Target-8 (ALL OFF) 0.00 V ( 0.00 to 0.30) Result: 0.01 V ... >> OK <<

29: Translators VT (OFF) 0.00 V ( 0.00 to 0.50) Result: 0.01 V ... >> OK <<
30: Translators VT (ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.78 V ... >> OK <<
31: Translators VT (ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.69 V ... >> OK <<
32: Translators VT (ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.59 V ... >> OK <<

33: Vpp Voltage-in 10.00 V ( 8.00 to 12.00) Result: 10.09 V ... >> OK <<
34: Vpp Voltage 7.00 V ( 6.50 to 7.30) Result: 6.87 V ... >> OK <<
35: Internal Vcc-3.3V 3.30 V ( 3.20 to 3.40) Result: 3.30 V ... >> OK <<

36: Vcc Target-1 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.60 V ... >> ERROR <<
37: Vcc Target-2 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 3.07 V ... >> ERROR <<
38: Vcc Target-3 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.78 V ... >> OK <<
39: Vcc Target-4 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.81 V ... >> OK <<
40: Vcc Target-5 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.79 V ... >> OK <<
41: Vcc Target-6 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.80 V ... >> OK <<
42: Vcc Target-7 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.83 V ... >> OK <<
43: Vcc Target-8 (ALL ON 1.8V) 1.80 V ( 1.60 to 2.00) Result: 1.79 V ... >> OK <<
44: Vcc Target-1 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 1.60 V ... >> ERROR <<
45: Vcc Target-2 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 3.06 V ... >> ERROR <<
46: Vcc Target-3 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.70 V ... >> OK <<
47: Vcc Target-4 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.73 V ... >> OK <<
48: Vcc Target-5 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.70 V ... >> OK <<
49: Vcc Target-6 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.71 V ... >> OK <<
50: Vcc Target-7 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.75 V ... >> OK <<
51: Vcc Target-8 (ALL ON 2.7V) 2.70 V ( 2.50 to 2.90) Result: 2.70 V ... >> OK <<
52: Vcc Target-1 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 1.60 V ... >> ERROR <<
53: Vcc Target-2 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.06 V ... >> ERROR <<
54: Vcc Target-3 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.60 V ... >> OK <<
55: Vcc Target-4 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.65 V ... >> OK <<
56: Vcc Target-5 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.60 V ... >> OK <<
57: Vcc Target-6 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.62 V ... >> OK <<
58: Vcc Target-7 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.67 V ... >> OK <<
59: Vcc Target-8 (ALL ON 3.6V) 3.60 V ( 3.40 to 3.80) Result: 3.61 V ... >> OK <<

60: Vcc discharge (100ms)Target-1 3.60 V ( 1.00 to 2.70) Result: 1.60 V ... >> OK <<
61: Vcc discharge (100ms)Target-2 3.60 V ( 1.00 to 2.70) Result: 3.06 V ... >> ERROR <<
62: Vcc discharge (100ms)Target-3 3.60 V ( 1.00 to 2.70) Result: 1.39 V ... >> OK <<
63: Vcc discharge (100ms)Target-4 3.60 V ( 1.00 to 2.70) Result: 1.36 V ... >> OK <<
64: Vcc discharge (100ms)Target-5 3.60 V ( 1.00 to 2.70) Result: 1.36 V ... >> OK <<
65: Vcc discharge (100ms)Target-6 3.60 V ( 1.00 to 2.70) Result: 1.36 V ... >> OK <<
66: Vcc discharge (100ms)Target-7 3.60 V ( 1.00 to 2.70) Result: 1.38 V ... >> OK <<
67: Vcc discharge (100ms)Target-8 3.60 V ( 1.00 to 2.70) Result: 1.36 V ... >> OK <<

68: Vcc Target-1 ( #1 ON ) 0.00 V ( 3.10 to 3.50) Result: 1.59 V ... >> ERROR <<
69: Vcc Target-2 ( #1 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
70: Vcc Target-3 ( #1 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.20 V ... >> OK <<
71: Vcc Target-4 ( #1 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
72: Vcc Target-5 ( #1 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
73: Vcc Target-6 ( #1 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
74: Vcc Target-7 ( #1 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
75: Vcc Target-8 ( #1 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
76: Vcc Target-1 ( #2 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
77: Vcc Target-2 ( #2 ON ) 0.00 V ( 3.10 to 3.50) Result: 3.04 V ... >> ERROR <<
78: Vcc Target-3 ( #2 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
79: Vcc Target-4 ( #2 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
80: Vcc Target-5 ( #2 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
81: Vcc Target-6 ( #2 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.18 V ... >> OK <<
82: Vcc Target-7 ( #2 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
83: Vcc Target-8 ( #2 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
84: Vcc Target-1 ( #3 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
85: Vcc Target-2 ( #3 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
86: Vcc Target-3 ( #3 ON ) 0.00 V ( 3.10 to 3.50) Result: 3.30 V ... >> OK <<
87: Vcc Target-4 ( #3 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
88: Vcc Target-5 ( #3 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
89: Vcc Target-6 ( #3 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.18 V ... >> OK <<
90: Vcc Target-7 ( #3 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
91: Vcc Target-8 ( #3 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
92: Vcc Target-1 ( #4 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
93: Vcc Target-2 ( #4 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
94: Vcc Target-3 ( #4 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.20 V ... >> OK <<
95: Vcc Target-4 ( #4 ON ) 0.00 V ( 3.10 to 3.50) Result: 3.34 V ... >> OK <<
96: Vcc Target-5 ( #4 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
97: Vcc Target-6 ( #4 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.18 V ... >> OK <<
98: Vcc Target-7 ( #4 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
99: Vcc Target-8 ( #4 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
100: Vcc Target-1 ( #5 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
101: Vcc Target-2 ( #5 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
102: Vcc Target-3 ( #5 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
103: Vcc Target-4 ( #5 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
104: Vcc Target-5 ( #5 ON ) 0.00 V ( 3.10 to 3.50) Result: 3.30 V ... >> OK <<
105: Vcc Target-6 ( #5 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
106: Vcc Target-7 ( #5 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
107: Vcc Target-8 ( #5 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
108: Vcc Target-1 ( #6 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
109: Vcc Target-2 ( #6 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
110: Vcc Target-3 ( #6 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
111: Vcc Target-4 ( #6 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
112: Vcc Target-5 ( #6 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
113: Vcc Target-6 ( #6 ON ) 0.00 V ( 3.10 to 3.50) Result: 3.32 V ... >> OK <<
114: Vcc Target-7 ( #6 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
115: Vcc Target-8 ( #6 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
116: Vcc Target-1 ( #7 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
117: Vcc Target-2 ( #7 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
118: Vcc Target-3 ( #7 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
119: Vcc Target-4 ( #7 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
120: Vcc Target-5 ( #7 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
121: Vcc Target-6 ( #7 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
122: Vcc Target-7 ( #7 ON ) 0.00 V ( 3.10 to 3.50) Result: 3.36 V ... >> OK <<
123: Vcc Target-8 ( #7 ON ) 3.30 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
124: Vcc Target-1 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 1.59 V ... >> ERROR <<
125: Vcc Target-2 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 3.05 V ... >> ERROR <<
126: Vcc Target-3 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
127: Vcc Target-4 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
128: Vcc Target-5 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
129: Vcc Target-6 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.18 V ... >> OK <<
130: Vcc Target-7 ( #8 ON ) 0.00 V ( 0.00 to 0.50) Result: 0.19 V ... >> OK <<
131: Vcc Target-8 ( #8 ON ) 3.30 V ( 3.10 to 3.50) Result: 3.30 V ... >> OK <<

132: SD Power OFF 0x0000 (0x0000 - 0x0000) Result: 0x00 ... >> OK <<
133: SD Power ON 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
134: SD Discharge - delay 2ms 0x0010 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
135: SD Discharge - delay 50ms 0x0010 (0x0000 - 0x0000) Result: 0x00 ... >> OK <<

136: BSL RX bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
137: BSL RX bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
138: BSL RX bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
139: BSL RX bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
140: BSL RX bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
141: BSL RX bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
142: BSL RX bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
143: BSL RX bus (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

144: BSL TX bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
145: BSL TX bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
146: BSL TX bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
147: BSL TX bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
148: BSL TX bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
149: BSL TX bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
150: BSL TX bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
151: BSL TX bus (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

152: TDI bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
153: TDI bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
154: TDI bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
155: TDI bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
156: TDI bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
157: TDI bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
158: TDI bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
159: TDI bus (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

160: TDOI Tx-bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
161: TDOI Tx-bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
162: TDOI Tx-bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
163: TDOI Tx-bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
164: TDOI Tx-bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
165: TDOI Tx-bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
166: TDOI Tx-bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
167: TDOI Tx-bus (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

168: TDOI Tx-Rx (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
169: TDOI Tx-Rx (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
170: TDOI Tx-Rx (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
171: TDOI Tx-Rx (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
172: TDOI Tx-Rx (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
173: TDOI Tx-Rx (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
174: TDOI Tx-Rx (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
175: TDOI Tx-Rx (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

176: TDOI Rx-bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
177: TDOI Rx-bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
178: TDOI Rx-bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
179: TDOI Rx-bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
180: TDOI Rx-bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
181: TDOI Rx-bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
182: TDOI Rx-bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
183: TDOI Rx-bus (#84 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

184: TMS bus (All HIGH) 0x00FF (0x00FF - 0x00FF) Result: 0xFF ... >> OK <<
185: TMS bus (All LOW) 0x0000 (0x0000 - 0x0000) Result: 0x00 ... >> OK <<

186: TMS bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
187: TMS bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
188: TMS bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
189: TMS bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
190: TMS bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
191: TMS bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
192: TMS bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
193: TMS bus (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

194: RST bus (All HIGH) 0x00FF (0x00FF - 0x00FF) Result: 0xFF ... >> OK <<
195: RST bus (All LOW) 0x0000 (0x0000 - 0x0000) Result: 0x00 ... >> OK <<

196: RST bus (#1 HIGH) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
197: RST bus (#2 HIGH) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
198: RST bus (#3 HIGH) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
199: RST bus (#4 HIGH) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
200: RST bus (#5 HIGH) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
201: RST bus (#6 HIGH) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
202: RST bus (#7 HIGH) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
203: RST bus (#8 HIGH) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

204: Keys buffer (All pull-up) 0x001F (0x001F - 0x001F) Result: 0x1F ... >> OK <<

205: Access to LCD RAM (0xAA) 0x00AA (0x00AA - 0x00AA) Result: 0xAA ... >> OK <<
206: Access to LCD RAM (0x99) 0x0099 (0x0099 - 0x0099) Result: 0x99 ... >> OK <<

207: Image Flash Access (get ID) 0x0002 (0x0001 - 0x0003) Result: 0x01 ... >> OK <<

208: TDI Fuse keys (#1 ON) 0x0001 (0x0001 - 0x0001) Result: 0x01 ... >> OK <<
209: TDI Fuse keys (#2 ON) 0x0002 (0x0002 - 0x0002) Result: 0x02 ... >> OK <<
210: TDI Fuse keys (#3 ON) 0x0004 (0x0004 - 0x0004) Result: 0x04 ... >> OK <<
211: TDI Fuse keys (#4 ON) 0x0008 (0x0008 - 0x0008) Result: 0x08 ... >> OK <<
212: TDI Fuse keys (#5 ON) 0x0010 (0x0010 - 0x0010) Result: 0x10 ... >> OK <<
213: TDI Fuse keys (#6 ON) 0x0020 (0x0020 - 0x0020) Result: 0x20 ... >> OK <<
214: TDI Fuse keys (#7 ON) 0x0040 (0x0040 - 0x0040) Result: 0x40 ... >> OK <<
215: TDI Fuse keys (#8 ON) 0x0080 (0x0080 - 0x0080) Result: 0x80 ... >> OK <<

216: TEST Fuse keys (All OFF ) 0.00 ( 0.00 to 0.30) Result: 0.00 ... >> OK <<
217: TEST Fuse keys (#1 ON) 1.00 ( 0.80 to 3.00) Result: 1.39 ... >> OK <<
218: TEST Fuse keys (#2 ON) 2.00 ( 0.80 to 3.00) Result: 1.57 ... >> OK <<
219: TEST Fuse keys (#3 ON) 3.00 ( 0.80 to 3.00) Result: 1.51 ... >> OK <<
220: TEST Fuse keys (#4 ON) 4.00 ( 0.80 to 3.00) Result: 1.42 ... >> OK <<
221: TEST Fuse keys (#5 ON) 5.00 ( 0.80 to 3.00) Result: 1.33 ... >> OK <<
222: TEST Fuse keys (#6 ON) 6.00 ( 0.80 to 3.00) Result: 1.22 ... >> OK <<
223: TEST Fuse keys (#7 ON) 7.00 ( 0.80 to 3.00) Result: 1.15 ... >> OK <<
224: TEST Fuse keys (#8 ON) 8.00 ( 0.80 to 3.00) Result: 1.17 ... >> OK <<

============== Finished =================================
* Test failed!! 25 error(s).
=========================================================


MSP430F5659: Cascade the JTAG ports of two MSP430s

$
0
0

Part Number:MSP430F5659

Dear Team,


I am using MSP430F5659 and i have a question about it. 

Could i Cascade the JTAG ports of two MSP430s and then using IAR emulation debugging? If yes,how could i do?

Thanks!

CCS/MSP432P401R: Error initialising emulator ? MSP430_RegisterMessageCallback ? Help required

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Hi

I'm using an MSP432P401R on a prototype board we've just had made, the board uses a JTAG connection with the same interface design used on the red launchpad I had been using for development. 

PROBLEM:

I am struggling to get the brand new, latest, MSP-FET to enter a debug session. I will program the board just fine through UNIFLASH, but fails to enter a debug session (in the latest CCS).

it produces the following error: 

"

Error initializing emulator:
Unable to locate entry point for MSP430_RegisterMessageCallback

"

In fact, it produces this error, EVEN with the usb cable to the debugger unplugged! Implying it's not even got as far as communicating with the MSP-FET yet? 

Similar threads have advices updating the DLL, i've been looking into the this and downloaded what i believe is the most up to date DLL, but to be honest i'm not entirely sure what this does and how to install/build the DLL?

any clues or help would be greatly appreciated. I'm getting fed up of debugging using the 3 LED's on the board and it's not really a viable long term solution!

Cheers,

Sean :)

MSP430F5438A: How to operate the multiple I2C devices via one set I2C lines of MSP430F5438A?

$
0
0

Part Number:MSP430F5438A

Hello,

I designed a board with MSP430F5438A, connected 4 I2C devices to a set I2C lines of UCB2 on P9.1 and P9.2. Now I verified the 1st devices operation with normal I2C initiation and operation codes as the example, but failed on the 2nd device, I re-initiate the I2C with the 2nd device's slave address, the problem is always no ACK response when executing start operation. 

Can somebody tell me the root cause? I am checking the HW signal quality of SCL and SDA, I had a query of the SW coding on how to operate the 2nd/3rd I2C devices, do I need re-initiate I2C completely? or just change the slave address of the UCB1I2CSA register? if yes, what's the required registers operation when just change slave address?

BTW, my compile tool is IAR.

Thanks very much in advance!

Best regards!

Hougqm

MSP432P401R: BSL example code

$
0
0

Part Number:MSP432P401R

I am trying to implement the BSL code on an existing board the main problem I have is that the interface uses UART 3 and I need to initialise it via a software interrupt  when using the scripter it appear that once the code has got the initialised response to FF that it sends the password script and image without waiting for a response in between 

RTOS/MSP430F5529: TI-RTOS : SPI can't work(can't receive data)

$
0
0

Part Number:MSP430F5529

Tool/software:TI-RTOS

Hi guy

I now need to verify standard SPI communication under the TI-RTOS framework  use  EXP_MSP430F5529LP  development board , I can not find a reference under the relevant examples of TI-RTOS for MSP430, now I can only simulate the framework of IIC to do related operations, and find that I can not read the data, I really do not know where the problem! Does anyone provide guidance or reference? my related code is as follows, Thanks, 

1. main.c

void SPI_Master_Write_Byte(uint8_t cmd, uint8_t *txBuf, uint8_t txBuf_Size)
{
    uint8_t i;
    uint8_t txBuffer[20];

    if(cmd == NULL || txBuf_Size <= 0 || txBuf_Size > 19)
        return;

    txBuffer[0] = cmd;
     for(i=1;i<txBuf_Size+1;i++)
         txBuffer[i] = txBuf[i-1];

    SPI_Transaction spiTransaction;
    spiTransaction.txBuf = txBuffer;
    spiTransaction.rxBuf = NULL;
    spiTransaction.count = txBuf_Size+1;

    //cs low
    GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN0);

    if (SPI_transfer(spi_master, &spiTransaction) == NULL) {
        System_printf("SPI Bus fault\n");
        System_flush();
    }

    //cs hight
    GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN0);

}

void SPI_Master_Read_Byte(uint8_t cmd, uint8_t *rxBuf,uint8_t rxBuf_Size)
{
    if(cmd == NULL || rxBuf_Size <= 0 || rxBuf_Size > 19)
        return;

    SPI_Transaction spiTransaction;
    spiTransaction.txBuf = NULL;
    spiTransaction.rxBuf = rxBuf;
    spiTransaction.count = rxBuf_Size+1;

    //cs low
    GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN0);

    char txbuf[1];
    txbuf[0] = cmd;
    spiTransaction.txBuf = txbuf;
    spiTransaction.rxBuf = NULL;
    spiTransaction.count = 1;

    if (SPI_transfer(spi_master, &spiTransaction) == NULL) {
        System_printf("SPI Bus fault\n");
        System_flush();
    }

    spiTransaction.txBuf = NULL;
    spiTransaction.rxBuf = rxBuf;
    spiTransaction.count = rxBuf_Size;

    if (SPI_transfer(spi_master, &spiTransaction) == NULL) {
        System_printf("SPI Bus fault\n");
        System_flush();
    }

    //cs hight
    GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN0);
}

/*
 *  ======== taskFxn ========
 *  Task for this function is created statically. See the project's .cfg file.
 */
Void spi_master_taskFxn(UArg arg0, UArg arg1)
{
    /* Create I2C for usage */
    SPI_Params_init(&spi_master_Params);
    spi_master_Params.transferMode  = SPI_MODE_CALLBACK;
    spi_master_Params.mode          = SPI_MASTER;
    spi_master_Params.bitRate       = 1000000,            /* bitRate Hz*/
    spi_master_Params.dataSize      = 8;
    spi_master_Params.frameFormat   = SPI_POL0_PHA0;
    spi_master = SPI_open(Board_SPI_MASTER, &spi_master_Params);
    if (spi_master == NULL) {
        System_abort("Error Initializing SPI\n");
    }
    else {
        System_printf("SPI Initialized!\n");
    }
    System_flush();

    while(1){
        Task_sleep(1000);
        memset(SlaveType2,0,TYPE_2_LENGTH);
        SPI_Master_Read_Byte(CMD_TYPE_2_SLAVE,SlaveType2,TYPE_2_LENGTH);;
        printf("%s\r\n",SlaveType2);

        GPIO_toggle(Board_LED_P4_7);;
    }

    /* Deinitialized SPI */
    //SPI_close(spi_master);
    //System_printf("SPI closed!\n");
    //System_flush();
}

/*
 *  ======== main ========
 */
int main(void)
{
    /* Call board init functions */
    Board_initGeneral();
    Board_initGPIO();
    Board_initSPI();

    //Construct heartBeat Task  thread
    Task_Params taskParams;
    Task_Params_init(&taskParams);

    //i2c master
    taskParams.arg0         = 1000;
    taskParams.stackSize    = TASKSTACKSIZE;
    taskParams.stack        = &spi_master_taskStack;
    Task_construct(&spi_master_taskStruct, (Task_FuncPtr)spi_master_taskFxn, &taskParams, NULL);

    /* Start BIOS */
    BIOS_start();

    return (0);
}

2. MSP_EXP430F5529LP.c

/*
 *  =============================== DMA ===============================
 */
/*
 *  ======== MSP_EXP430F5529LP_isrDMA ========
 *  This is a application defined DMA ISR. This ISR must map and call the
 *  appropriate Driver_event(handle) API to indicate completed DMA transfers.
 */
Void MSP_EXP430F5529LP_isrDMA(UArg arg)
{
    /* Call the SPI DMA function, passing the SPI handle used for WiFi */
    SPI_serviceISR((SPI_Handle) &(SPI_config[0]));
}


/*
 *  =============================== SPI ===============================
 */
/* Place into subsections to allow the TI linker to remove items properly */
#if defined(__TI_COMPILER_VERSION__)
#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
#pragma DATA_SECTION(spiUSCIADMAHWAttrs, ".const:spiUSCIADMAHWAttrs")
#endif

#include <ti/drivers/SPI.h>
#include <ti/drivers/spi/SPIUSCIADMA.h>

SPIUSCIADMA_Object spiUSCIADMAObjects[MSP_EXP430F5529LP_SPICOUNT];
uint8_t spiUSCIADMAscratchBuf[MSP_EXP430F5529LP_SPICOUNT];

const SPIUSCIADMA_HWAttrs spiUSCIADMAHWAttrs[MSP_EXP430F5529LP_SPICOUNT] = {
    {
        .baseAddr           = USCI_A0_BASE,
        .clockSource        = USCI_A_SPI_CLOCKSOURCE_SMCLK,
        .bitOrder           = USCI_A_SPI_MSB_FIRST,
        .scratchBufPtr      = &spiUSCIADMAscratchBuf[0],
        .defaultTxBufValue  = 0,

        /* DMA */
        .dmaBaseAddr        = DMA_BASE,
        /* Rx Channel */
        .rxDMAChannelIndex  = DMA_CHANNEL_1,
        .rxDMASourceTrigger = DMA_TRIGGERSOURCE_18,
        /* Tx Channel */
        .txDMAChannelIndex  = DMA_CHANNEL_0,
        .txDMASourceTrigger = DMA_TRIGGERSOURCE_19
    }
};

const SPI_Config SPI_config[] = {
    {
        .fxnTablePtr    = &SPIUSCIADMA_fxnTable,
        .object         = &spiUSCIADMAObjects[0],
        .hwAttrs        = &spiUSCIADMAHWAttrs[0]
    },
    {NULL, NULL, NULL},
};

/*
 *  ======== MSP_EXP430F5529LP_initSPI ========
 */
//                   MSP430F5529
//                 -----------------
//            /|\ |             P2.0|-> Slave Chip Select (GPIO)
//             |  |                 |
//                |             P3.3|-> Data Out (UCA0SIMO)
//                |                 |
//       Button ->|P1.1         P3.4|<- Data In (UCA0SOMI)
//                |                 |
//                |             P2.7|-> Serial Clock Out (UCA0CLK)
void MSP_EXP430F5529LP_initSPI(void)
{
    /*
     * NOTE: TI-RTOS examples configure USCIB0 as either SPI or I2C.  Thus,
     * a conflict occurs when the I2C & SPI drivers are used simultaneously in
     * an application.  Modify the pin mux settings in this file and resolve the
     * conflict before running your the application.
     */
    /* Configure CS pins to disable spi slave device*/
    GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN0);
    GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN0);

    /* Configure Slave Reset Contrl pins to disable spi slave device*/
    //GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN5);
    //GPIO_setOutputHighOnPin(GPIO_PORT_P1, GPIO_PIN5);
    //GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN5);    // Now with SPI signals initialized,
    //__delay_cycles(100000);
    //GPIO_setOutputHighOnPin(GPIO_PORT_P1, GPIO_PIN5);   // reset slave
    //__delay_cycles(100000);                             // Wait for slave to initialize

    /* SPI CLK */
    GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN7);
    /* MOSI/SIMO */
    GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P3, GPIO_PIN3);
    /* MISO/SOMI */
    GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P3, GPIO_PIN4);

    SPI_init();
}

3. .cfg 

/* ================ Hwi configuration ================ */
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
var msp430Hwi = xdc.useModule('ti.sysbios.family.msp430.Hwi');
halHwi.checkStackFlag = true;
//halHwi.checkStackFlag = false;


var hwiParams = new halHwi.Params();

/* DMA Hwi for the SPIUSCI driver */
//SPIUSCIBDMA_hwiIntFxn
//DMA_VECTOR      50
//USCI_B0_VECTOR  55
//USCI_A0_VECTOR  56
hwiParams.arg = 0;
halHwi.create(50, "&MSP_EXP430F5529LP_isrDMA", hwiParams);

Viewing all 22203 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>