Jump to content

LiviuM

Members
  • Content Count

    91
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by LiviuM


  1. As I said, I haven't use them. Have a look in the (4) mentioned files at the comments to the functions.

    I suppose you should have something like following in your code:

    uint32_t readParity0 =  UARTParityModeGet(UART0_BASE);
    // until
    uint32_t readParity7 =  UARTParityModeGet(UART7_BASE);
    
    UARTParityModeSet(UART0_BASE, UART_CONFIG_PAR_NONE); //or
    UARTParityModeSet(UART0_BASE, UART_CONFIG_PAR_EVEN); //or
    UARTParityModeSet(UART0_BASE, UART_CONFIG_PAR_ODD); 

  2. Hi Gino,

    try Serial2, Serial3... for the further serial ports (see energia/hardware/tivac/1.0.3/cores/tivac/HardwareSerial.h && .cpp files for details):

    extern HardwareSerial Serial;
    extern HardwareSerial Serial1;
    extern HardwareSerial Serial2;
    extern HardwareSerial Serial3;
    extern HardwareSerial Serial4;
    extern HardwareSerial Serial5;
    extern HardwareSerial Serial6;
    extern HardwareSerial Serial7;

    For parity I have no idea if it works, but in the energia/hardware/tivac/1.0.3/system/driverlib/uart.h && .c files there are some functions handling the parity:

    extern void UARTParityModeSet(uint32_t ui32Base, uint32_t ui32Parity);
    extern uint32_t UARTParityModeGet(uint32_t ui32Base);

    Best regards,

    Liviu


  3. Just burned the Blink example in my MSP430G2231LP Launchpad using Energia 1.6.10E18 under openSuse Leap 42.1

    Trying to open interface 1 on 022
    Initializing FET...
    FET protocol version is 30066536
    Set Vcc: 3000 mV
    Configured for Spy-Bi-Wire
    Sending reset...
    Device ID: 0xf201
      Code start address: 0xf800
      Code size         : 2048 byte = 2 kb
      RAM  start address: 0x200
      RAM  end   address: 0x27f
      RAM  size         : 128 byte = 0 kb
    Device: MSP430F2012/G2231
    Number of breakpoints: 2
    fet: FET returned NAK
    warning: device does not support power profiling
    Chip ID data: f2 01 02
    Erasing...
    Programming...
    Writing  810 bytes at f800...
    Writing   32 bytes at ffe0...
    Done, 842 bytes total

     


  4. 4 hours ago, admirlk said:

     but Windows Updates have been broken for several years on my machine.

    There are instructions in Internet on how to fix Windows Updates - you should download and install some files per hand.

    Searching after "broken Windows Updates" should help to find them.


  5. Just tried to read some data from a DS1307 using my TivaC and the (slightly changed - use the i2c1 module) master_reader example from the wire library.

    The DS answers (ACK) to the addressing (0x68) and gives back some data. No idea if the data is correct, but the logic analyzer can decode it. 

    Hardware connections:

    DS     Launchpad
    Vdd -> +5V 
    Gnd -> Gnd
    SDA -> SDA1 (PN_4, Launchpad pin 50), 10KOhm -> +3V3
    SCL -> SCL1 (PN_5, Launchpad pin 49), 10KOhm -> +3V3

    The working code:

    #include <Wire.h>
    
    void setup()
    {
      Serial.begin(115200);  // start serial for output
      delay(200);
      Serial.println("Serial interface OK");
      Wire.setModule(1);
      Wire.begin();        // join i2c bus (address optional for master)
    }
    
    void loop()
    {  
      Serial.println("ask some data");
      delay(500);
      Wire.requestFrom(0x68, 5,false);    // request 6 bytes from slave device #2
    
      while(Wire.available())    // slave may send less than requested
      { 
        char c = Wire.read(); // receive a byte as character
        Serial.print(c);         // print the character
      }
      Serial.println();
    //  delay(500);
    }

     


  6. 9 minutes ago, hemangjoshi37a said:

    From Arduino's Serial terminal I should get "Hii" message

    How? Your Arduino is connected to the MSP board. Is it connected to the PC in the same time? I don't think you can share the U(S)ART link in this way.

    When you check it with the oscilloscope, is the MSP board connected to the Arduino/PC, or alone?

     


  7. Hi,

    it seems, the Arduino's SPI library has an SPISettings class and Energia's SPI library not. Some older version of the mfr522 library (version=1.1.8, for example) don't use the SPISettings class and compiles for TivaC.

     

    class SPISettings {
    public:
      SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) {
        if (__builtin_constant_p(clock)) {
          init_AlwaysInline(clock, bitOrder, dataMode);
        } else {
          init_MightInline(clock, bitOrder, dataMode);
        }
      }
      SPISettings() {
        init_AlwaysInline(4000000, MSBFIRST, SPI_MODE0);
      }
    private:
      void init_MightInline(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) {
        init_AlwaysInline(clock, bitOrder, dataMode);
      }
      void init_AlwaysInline(uint32_t clock, uint8_t bitOrder, uint8_t dataMode)
        __attribute__((__always_inline__)) {
        // Clock settings are defined as follows. Note that this shows SPI2X
    ...

     

×
×
  • Create New...