Jump to content

Thomas1426459898

Members
  • Content Count

    8
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Thomas1426459898 got a reaction from JeffDAK in LM4F120 CAN peripheral   
    I also used the MCP2551 to connect a LM4F120 (on the Stellaris Launchpad) to a CAN bus. It's really simple.. just connect the TX and RX lines to the MCP2551 and set the proper pin configuration in the simple_tx example (I used PE4/PE5 for the CAN0 module). Here is my mini-howto: http://www.fischl.de/arm/can_bus_interface_for_stellaris_launchpad/
  2. Like
    Thomas1426459898 got a reaction from p2baron1426459919 in Interfacing Stellaris Launchpad to CAN bus   
    Hi,
     
    I've played around with the CAN module of the Stellaris controller on the Launchpad. To connect the Stellaris Launchpad to a CAN bus, an external CAN transceiver is needed... but only a few wires are necessary. See the attached circuit diagram.
     
    Some further details about my experiments: http://www.fischl.de/arm/can_bus_interface_for_stellaris_launchpad/
     
    Thomas

  3. Like
    Thomas1426459898 got a reaction from Automate in SLLogicLogger - A simple logic analyser for the Stellaris Launchpad   
    Hi,
     
    Here is my last project with the Stellaris Launchpad: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
     
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/
     
    The logic states are sampled from the GPIO to an array within an for-loop:
    // sampling buffer char buffer[BUFFERSIZE]; // aquire data for (i = BUFFERSIZE; i != 0; i--) { buffer[i - 1] = GPIO_PORTB_DATA_R; } With this method I get 10 MHz sampling rate at 80 MHz system clock. Does anybody know, if there is a chance to speed it up? E.g. using AHB, uDMA, ...?
     
    Thomas

  4. Like
    Thomas1426459898 got a reaction from pimmel in [ ENDED ] Jan-Feb 2013 - Stellarisiti Project of the Month Contest   
    Here is my December project: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/

  5. Like
    Thomas1426459898 got a reaction from RobG in Interfacing Stellaris Launchpad to CAN bus   
    Hi,
     
    I've played around with the CAN module of the Stellaris controller on the Launchpad. To connect the Stellaris Launchpad to a CAN bus, an external CAN transceiver is needed... but only a few wires are necessary. See the attached circuit diagram.
     
    Some further details about my experiments: http://www.fischl.de/arm/can_bus_interface_for_stellaris_launchpad/
     
    Thomas

  6. Like
    Thomas1426459898 got a reaction from Nytblade in SLLogicLogger - A simple logic analyser for the Stellaris Launchpad   
    Hi,
     
    Here is my last project with the Stellaris Launchpad: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
     
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/
     
    The logic states are sampled from the GPIO to an array within an for-loop:
    // sampling buffer char buffer[BUFFERSIZE]; // aquire data for (i = BUFFERSIZE; i != 0; i--) { buffer[i - 1] = GPIO_PORTB_DATA_R; } With this method I get 10 MHz sampling rate at 80 MHz system clock. Does anybody know, if there is a chance to speed it up? E.g. using AHB, uDMA, ...?
     
    Thomas

  7. Like
    Thomas1426459898 reacted to larsie in Square wave generator   
    I've coded a very simple square wave generator. It uses the buttons on P1.0 eh... ooopps... PB5 and PB0 (the two first buttons on the LarsLCD board), and prints the kHz value on the LarsLCD. It should run without the LCD also. The output is on PA2 (bottom right).


    The LCD library is from CorB's post and is mainly his code by now. The generator code is adapted from the example timer code in the project documentation. If you have input on ways to write it better (button presses etc), I'm very happy to receive feedback.
     
    #include <stdint.h> #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "driverlib/gpio.h" #include "driverlib/pin_map.h" #include "driverlib/ssi.h" #include "driverlib/sysctl.h" #include "driverlib/interrupt.h" #include "driverlib/timer.h" #include "glcd_hwSPI.h" void PortBIntHandler(void); #define SSI_CLK GPIO_PIN_4 #define SSI_TX GPIO_PIN_7 #define GPIO_PB4_SSI2CLK 0x00011002 #define GPIO_PB7_SSI2TX 0x00011C02 volatile int btn1 = 0; int main(void) { unsigned long ulPeriod; SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_2); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3); SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI2); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); // CS ENABLE GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_5); // CS LOW GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_5, 0); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); GPIOPinConfigure(GPIO_PB4_SSI2CLK); GPIOPinConfigure(GPIO_PB7_SSI2TX); GPIOPinTypeSSI(GPIO_PORTB_BASE, SSI_CLK | SSI_TX); // // Configure SSI2 // SSIConfigSetExpClk(SSI2_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, SysCtlClockGet() / 2, 16); // // Enable the SSI module. // SSIEnable(SSI2_BASE); LCD_Init(); SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0); TimerConfigure(TIMER0_BASE, TIMER_CFG_32_BIT_PER); ulPeriod = (SysCtlClockGet() / 1000) / 2; TimerLoadSet(TIMER0_BASE, TIMER_A, ulPeriod - 1); IntEnable(INT_TIMER0A); TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT); IntMasterEnable(); TimerEnable(TIMER0_BASE, TIMER_A); // Set up IO GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_0); GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_5); GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_5, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); writeString(0, 0, "Signal generator"); int f = 1; while (1) { int pressed = 0; if (!GPIOPinRead(GPIO_PORTB_BASE, GPIO_PIN_5)) { GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, GPIO_PIN_1); SysCtlDelay(1000000); GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, 0); f -= 1; pressed = 1; } else if (!GPIOPinRead(GPIO_PORTB_BASE, GPIO_PIN_0)) { GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, GPIO_PIN_2); SysCtlDelay(1000000); GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, 0); f += 1; pressed = 1; } if (pressed) { if (f < 0) { f = 1; } else if (f > 999) { f = 999; } ulPeriod = (SysCtlClockGet() / (f * 1000)) / 2; TimerLoadSet(TIMER0_BASE, TIMER_A, ulPeriod - 1); } setcharmode(1); writeInt(20, 2, f, 1); setcharmode(0); writeString(70, 3, "kHz"); writeString(0, 7, " - + "); pressed = 0; } } void Timer0IntHandler(void) { // Clear the timer interrupt TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT); // Read the current state of the GPIO pin and // write back the opposite state if (GPIOPinRead(GPIO_PORTA_BASE, GPIO_PIN_2)) { GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2, 0); } else { GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_PIN_2); } }   
    Files are attached, including the LCD library. I've adapted it to use header-files.
    sq-wav-gen.zip

  8. Like
    Thomas1426459898 got a reaction from larsie in SLLogicLogger - A simple logic analyser for the Stellaris Launchpad   
    Hi,
     
    Here is my last project with the Stellaris Launchpad: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
     
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/
     
    The logic states are sampled from the GPIO to an array within an for-loop:
    // sampling buffer char buffer[BUFFERSIZE]; // aquire data for (i = BUFFERSIZE; i != 0; i--) { buffer[i - 1] = GPIO_PORTB_DATA_R; } With this method I get 10 MHz sampling rate at 80 MHz system clock. Does anybody know, if there is a chance to speed it up? E.g. using AHB, uDMA, ...?
     
    Thomas

  9. Like
    Thomas1426459898 got a reaction from CorB in SLLogicLogger - A simple logic analyser for the Stellaris Launchpad   
    Hi,
     
    Here is my last project with the Stellaris Launchpad: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
     
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/
     
    The logic states are sampled from the GPIO to an array within an for-loop:
    // sampling buffer char buffer[BUFFERSIZE]; // aquire data for (i = BUFFERSIZE; i != 0; i--) { buffer[i - 1] = GPIO_PORTB_DATA_R; } With this method I get 10 MHz sampling rate at 80 MHz system clock. Does anybody know, if there is a chance to speed it up? E.g. using AHB, uDMA, ...?
     
    Thomas

  10. Like
    Thomas1426459898 got a reaction from bluehash in SLLogicLogger - A simple logic analyser for the Stellaris Launchpad   
    Hi,
     
    Here is my last project with the Stellaris Launchpad: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
     
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/
     
    The logic states are sampled from the GPIO to an array within an for-loop:
    // sampling buffer char buffer[BUFFERSIZE]; // aquire data for (i = BUFFERSIZE; i != 0; i--) { buffer[i - 1] = GPIO_PORTB_DATA_R; } With this method I get 10 MHz sampling rate at 80 MHz system clock. Does anybody know, if there is a chance to speed it up? E.g. using AHB, uDMA, ...?
     
    Thomas

  11. Like
    Thomas1426459898 got a reaction from bluehash in [ ENDED ] Jan-Feb 2013 - Stellarisiti Project of the Month Contest   
    Here is my December project: SLLogicLogger - A simple logic analyser for the TI Stellaris Launchpad.
    Logic levels on PORTB are sampled with 10MHz to RAM (16 kBytes) and then transmitted through the debugging controller over USB to a host computer. No additional hardware is needed - a pure Stellaris Launchpad connected over the debug-USB to an PC is enough. The firmware implements the main functions of SUMP, a serial protocol for logic analysers. There are some clients which supports SUMP. I used LogicSniffer OLS (http://www.lxtreme.nl/ols/) which is a multiplatform Java client. A simple OLS profile file is sufficient to read out the sampled data from the Launchpad.
    Sampling starts on any state change on PORTB, no further trigger functions are supported yet.
     
    Further description and download:
    http://www.fischl.de/arm/sllogiclogger_logic_analyser_for_stellaris_launchpad/

  12. Like
    Thomas1426459898 got a reaction from larsie in How fast is the IO?   
    Interesting topic! I played around with the other direction: reading fast as possible from GPIO and save the values to RAM (see project description http://forum.stellarisiti.com/topic/335-open-nov-dec-2012-stellarisiti-project-of-the-month-contest/?p=1972). I got a maximum sample rate of 10 MHz. Perhaps some of this hints are also useful for reading GPIO instead of toggling!
     
     
  13. Like
    Thomas1426459898 got a reaction from TheDirty1426459890 in LM4F120 CAN peripheral   
    I also used the MCP2551 to connect a LM4F120 (on the Stellaris Launchpad) to a CAN bus. It's really simple.. just connect the TX and RX lines to the MCP2551 and set the proper pin configuration in the simple_tx example (I used PE4/PE5 for the CAN0 module). Here is my mini-howto: http://www.fischl.de/arm/can_bus_interface_for_stellaris_launchpad/
  14. Like
    Thomas1426459898 got a reaction from bluehash in LM4F120 CAN peripheral   
    I also used the MCP2551 to connect a LM4F120 (on the Stellaris Launchpad) to a CAN bus. It's really simple.. just connect the TX and RX lines to the MCP2551 and set the proper pin configuration in the simple_tx example (I used PE4/PE5 for the CAN0 module). Here is my mini-howto: http://www.fischl.de/arm/can_bus_interface_for_stellaris_launchpad/
×
×
  • Create New...