Jump to content

pao

Members
  • Content Count

    5
  • Joined

  • Last visited

About pao

  • Rank
    Noob Class
  • Birthday 05/23/1967

Contact Methods

  • Website URL
    http://none

Profile Information

  • Gender
    Male
  • Location
    japan
  • Github
    https://github.com/Osuga
  1. pao

    ADC on Tiva C Series

    HI @ Which your Microcontroller ? Do you have 'Tiva C Series LaunchPad ( EK-TM4C123GXL) ? if you have 'Tiva C Series LaunchPad', you can connect pin 'PE3' GPIO_PORTC_BASE ==> GPIO_PORTE_BASE SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); GPIOPinTypeADC(GPIO_PORTE_BASE,GPIO_PIN_3); ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0); ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_IE |ADC_CTL_END);
  2. Hi angel d Do you have TivaWare for C serise software 'SW-TM4C' ? you can download this site, http://www.ti.com/tool/sw-tm4c-drl SW-TM4C: is TivaWare for C Series Software SW-TM4C-DRL: is TivaWare™ Peripheral Driver Library for C Series SW-TM4C-USBL: is TivaWare™ USB Library for C Series SW-TM4C-GRL: is TivaWare™ for C Series Graphics Library Do you know 'Energia'? its more easy programing tool. Please check this site http://energia.nu/ enjoy Tiva world!!
  3. Hi all, I'm testing system clock frequency. 1) change board.txt (energia_dir)\hardware\lm4f\boards.txt ###################################################### # Tiva C TM4C1233H6PM 80MHz # with launchpad ###################################################### lpTivaC-1.name=Tiva C w/ TM4C1233H6PM (80MHz) lpTivaC-1.upload.maximum_size=262144 lpTivaC-1.build.mcu=cortex-m4 lpTivaC-1.build.f_cpu=80000000L lpTivaC-1.build.core=lm4f lpTivaC-1.build.variant=stellarpad lpTivaC-1.ldscript=lm4fcpp.ld ###################################################### # Tiva C TM4C1233H6PM 25MHz # with launchpad ###################################################### lpTivaC-2.name=Tiva C w/ TM4C1233H6PM (25MHz) lpTivaC-2.upload.maximum_size=262144 lpTivaC-2.build.mcu=cortex-m4 lpTivaC-2.build.f_cpu=25000000L lpTivaC-2.build.core=lm4f lpTivaC-2.build.variant=stellarpad lpTivaC-2.ldscript=lm4fcpp.ld 2) change wireing.c, (energia_dir)\hardware\lm4f\cores\lm4f\wiring.c void timerInit() { #if F_CPU >= 80000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 50000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 40000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 25000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_8|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 16000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_12_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 8000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_25|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 4000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_50|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #else ROM_SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #endif // // Run at system clock at 80MHz // // // SysTick is used for delay() and delayMicroseconds() // // ROM_SysTickPeriodSet(0x00FFFFFF); ROM_SysTickPeriodSet(ROM_SysCtlClockGet() / TICKS_PER_SECOND); ROM_SysTickEnable(); ..... } unsigned long micros(void) { volatile unsigned int conMz = ROM_SysCtlClockGet()/1000/1000; // return (milliseconds * 1000) + (HWREG(TIMER5_BASE + TIMER_O_TAV) / 80); return (milliseconds * 1000) + (HWREG(TIMER5_BASE + TIMER_O_TAV) / conMz); } void delayMicroseconds(unsigned int us) { volatile unsigned int conMz = ROM_SysCtlClockGet()/1000/1000; volatile unsigned long elapsedTime; unsigned long startTime = HWREG(NVIC_ST_CURRENT); do{ elapsedTime = startTime-(HWREG(NVIC_ST_CURRENT) & 0x00FFFFFF); } // while(elapsedTime <= us*80); while(elapsedTime <= us*conMz ); } 3) check clock @ Stellaris LaunchPad // // Check System Clock // // #include "Energia.h" #include "inc/hw_ints.h" #include "inc/hw_nvic.h" #include "inc/hw_sysctl.h" #include "inc/hw_types.h" #include "inc/hw_timer.h" #include "driverlib/rom.h" #include "driverlib/cpu.h" #include "driverlib/debug.h" #include "driverlib/interrupt.h" #include "driverlib/timer.h" #include "driverlib/sysctl.h" #include "driverlib/systick.h" void setup() { Serial.begin(38400); pinMode( PUSH1, INPUT_PULLUP ); pinMode( PUSH2, INPUT_PULLUP ); } uint32_t system_clock; uint32_t tick_value; void loop() { // put your main code here, to run repeatedly: system_clock = SysCtlClockGet()/1000; Serial.println( system_clock ); tick_value = ROM_SysTickPeriodGet(); Serial.println( tick_value ); tone( BLUE_LED,500,100); delay(1000); }
  4. please check this web site https://github.com/energia/Energia/wiki/Hardware#wiki-Serial_port_communication_Hardware_UART PCB version 1.5 jumper J3 TXD and RXD MSP430G2542----->>> [] [] [] [] [] MSP430G2553 ----->>> [=] [] [] []
  5. Thank you new release. I can't compile at StellarPad There is not 'libiconv-2.dll' in new release folder 'energia-0101E0010' Pleae check zip file.
×
×
  • Create New...