Jump to content
43oh

Lyon

Members
  • Content Count

    193
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Lyon

  1. Hi, The ARM architecture is a complex one, so best thing to do is to read the user manual. This is because ARM depart from usual 8 or 16 bit implementations you may know from other brands. Some historical things first: ARM company sell only the project of the core and some peripherals. The buyer then add its own extra peripherals so the final product differ from company to company - so if you need to use a particular brand, first thing first is to read the user manual. For extra readings of the core, you may go to ARM an search their manuals and user documentation. As for API, you mus
  2. Lyon

    Tiva version 2.1

    Hi, Today was released TivaWare version 2.1.0.12573 which can be downloaded from here: software-dl.ti.com/tiva-c/SW-TM4C/latest/index_FSD.htm This new release contain many news, including some compiler configuration needed to be changed - the famous TARGET_IS_BLIZZARD_REVxx was changed to TARGET_IS_TM4C123_REVxx. Also many driverlib functions were changed or moved to other .h files. As many users will try to update this, please it is wise to read first this document: SW-TM4C-RLN-2.1.0.12573.pdf which is located in /doc folder of your Tiva-2.1 installation. Regards, L
  3. Lyon

    TLC5947

    Hi, Something I do not understand in your TLC5947Update function: are port B pins used as blank signals? if yes, then with GPIOPinWrite you just keep them high, blocking everything, no set to 0 anywhere. Is that what you meant? Also, did you used an oscilloscope to verify the SPI operating, and used some breakpoints ? What tools do you use - I had problems with some compiler brands modifying unexpectedly the case blocks - check yours... L
  4. Lyon

    TLC5947

    Hi, Two problems spotted with your code: 1) This snippet here: // // Enable pin PA2 for SSI0 SSI0CLK // GPIOPinConfigure(GPIO_PA2_SSI0CLK); GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_2); // // Enable pin PA5 for SSI0 SSI0TX // GPIOPinConfigure(GPIO_PA5_SSI0TX); GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_2); //<- ???? why is that ???? // // Enable pin PA5 for SSI0 SSI0TX // GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_6); SSIConfigSetExpClk(SSI0_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, SysCtlClockGet()/32, 12); You use same two pins for different functions - GPI
  5. Lyon

    Flash write time

    Hi, Conceptually it is possible, but depends - if you use the driverlib function FlashProgram, you may note the waiting for write accomplishment (the code is in flash.c file) - but also there is a flash interrupt routine, so in this case you must modify or write your own function if you need to use interrupts. L
  6. Lyon

    Flash write time

    Hi, The data sheet specify a write time for a maximum 300 microseconds, while typical is 50. Do not rely on typical, since this is not explained in what context is supposed to be true. Always count on maximum in these cases. Your 21KHz sampling rate gives a possible write time 47.5 microseconds, not even typical... About your goals here - you may try to define in RAM two big enough ping-pong buffers, aligned at 8, if you have enough RAM (TM4C123xx is short in RAM, only 32K, 129 series is much bigger, 256K). Fill up the first buffer and start to transfer to flash while filling up the second a
  7. Hi, I apologize, my fault - the startup.gcc provided was from StrelarisWare version 9453, so the only correction is to add #include <stdint.h> at the beginning of startup_gcc.c file, and you need to place it as the first include, since there are already other two files. Please take care to provide an include path to the stdint.h file in your compiler installation if not already specified. L
  8. Hi, It is a known bug in function ROM_SysCtlADCSpeedSet, see below the comments of a TI guru: The manner of changing the ADC speed has changed on TM4C devices from LM3S devices. This change is not yet comprehended in TivaWare. As a result, the SysCtlADCClockSet function may not work correctly. To ensure proper operation, remove any references to the SysCtlADCClockSet function and use the following instead. Enable the ADC module and then use: HWREG(ADC0_BASE + ADC_O_PC) = (<SPEED>); Where <SPEED> is one of the following: ADC_PC_SR_125K ADC_PC_SR_250K ADC_PC_SR_500K ADC_PC_SR
  9. Hi, This is strange since the function ResetISR does not use uint32_t at all. The only place could be the definition of HWREG itself - but for the moment I am in a short time and cannot check, i will do that in several hours to come. In the mean time, you have two possible solutions: 1) add these lines at the beginning of the startup file: #include <stdbool.h> #include <stdint.h> and check them for the uint32_t first before compiling; 2) instead the two lines above, you can use: #define uint32_t unsigned long L
  10. Hi, First some technical details about your sources of inspiration: 1) FX2L chip which is the base of Saleae product is an 8051 chip, with some heavy-duty hardware embedded - their GPIF stands for General Purpose InterFace - which has not a correspondent in TM4C123 chips. Also there is an high-speed USB interface, designed to run at maximum, 480M. Also the chip has a big 4K FIFO buffer. 2) So the corresponding sigrok software can be used only as a template, since it is specifically written for 8051. The hardware implementation also dictates the software, so you must be prepared to hard work
  11. Lyon

    Loop timer

    Hi, Your routines uses SysTimerTick at 10 ms rate, and at this rate the execution speed of the while loop is much smaller, that's why you get always the same results for both variables. To measure this execution time (an of any other routines) you have two possibilities: 1) Configure a convenient pin as GPIO output pin, and then use it as below: while (1) { GPIOPinWrite(port, pin,pin) // set it high // your code to be executed here GPIOPinWrite(port, pin, 0) // set it low // at this stage, you may close the loop, but the "low" duration will be very short, so this i
  12. Hi, Some more useful things: L gcc-lk-start.zip
  13. Hi, A small picture of the project on Eclipse:
  14. Hi, There some problems with your project: 1) You do not need two initializations files, namely startup_gcc.c and LM4F_startup.c. Remove the last one from your project and keep only that from TI (although small changes are needed, later…). As you note, you get some warnings, while the first one compiles OK. 2) Do not know what is LM4F.ld - if from the same author like Makefile, then could be buggy, and bugs shows up when used on little bit more bigger/complex projects than blinky one. 3) The linker must be called from gcc, not directly - this is the recommendation and the good practice. Good
  15. Hi, One reson more: on Tiva micros, the driverlib is included on-chip, so no need to add it as a lib. L
  16. Hi, As I said, you need to add the code body of the functions used. In a *.h file, these functions are only declared, i.e. the shape and parameters are shown. As for driverlib, you add the library itself. Here it is not the case, you have only a transducer and not a library. The same thing is the case of UARTPrintf functions, located in uartstdio files. L
  17. Hi, You must take two steps: 1) add this line at the beginning of the file where you call MPU6050Init(): #include "sensorlib/mpu6050.h" 2) add the file sensorlib/mpu6050.c to your project. You can add it by just importing to your project or by adding as a symbolic link (when you import this file, observe the "Options" region at the lower part of the importing window. Click "Advanced" and then click on "Create links in the workspace"). This is needed to add also the code for the called functions. L
  18. Hi, Please review your defines, hope this one: PART=TM4C123GH6PM is only a typing mistake. It should be PART_TM4C123GH6PM. L
  19. Hi, I checked the posted code and compile correctly, with shown settings. I have slightly modified it, to allow ROM functions calls. The tested version is this: #include <stdint.h> #include <stdbool.h> #include "inc/hw_gpio.h" #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "driverlib/sysctl.h" #include "driverlib/pin_map.h" #include "driverlib/gpio.h" #include "driverlib/pwm.h" #include "driverlib/rom.h" int main(void) { unsigned long ulPeriod; ROM_FPUEnable(); ROM_FPUStackingEnable(); //Set the clock ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_PLL |S
  20. HI, To have alternate pins functions available, you must take two actions: 1) insert this: #include "driverlib/pin_map.h" at the beginning of your file; 2) check to have defined both PART_LM4Cxxxxx (write here the exact type of your micro) and TARGET_IS_BLIZZARD_RA1. The last one is useful in calling ROM_ prefixed functions. But above all, first you need to check if your micro has the PWM module, since it is not present on all devices, even these has the same number of pins. L
  21. Hi, You do not provide enough info about your Tiva (which version do you have) nor the board. I will assume you have Tiva 1.1 on Launchpad. If it is correct, then: a) info and electrical diagram should be found in spmu357a.pdf - TM4C123GXL Development Board User's Manual; b0) about software: this is a little bit with problem: mechanical push buttons suffer from "bouncing phenomena" i.e. there are a number of on-off switching states when you push the button so the several consecutive reads are not accurate, until the mechanical contact stabilize and the read is clean. Consequently, you must
  22. Hi, I understand you - that's why I said in a previous post the Cortex-Mx is big/complicated, at least at the beginning. What I can say this micro has a special debugging machine inside, is able to show you the address of buggy code line (in some instances) and also the type of bug. So if you like to know more about, look for application note spma043.pdf - Diagnosing software.. at TI page for TM4C micro controllers. Worth the effort to read and learn. About other micro controllers, I avoided both AVR and Microchip (although I made a project once based on 8-bit Microchip) - did not liked at a
  23. Hi, The disable/enable UART is stated in the user's manual - I used this in my projects. The functions are defined in the driverlib, you may call them with ROM_ prefix as usual. The driverlib/uart.h is already included. It seems you have experience with some other micro controllers, but please note this one is a big/complicated, so the first thing to do is to read/note the differences with other micro controllers. The same apply also to ADC -> sample sequencer - first disable the sequencer, configure it, then enable it back. One more problem: if you really send '2' '0' '3' '0' '\r' '
  24. Hi, 5000000 is a defined baud rate in the user manual, maximum is 10,000,000. But there are some problems with operating at these speeds. There were discussions on stellaris_arm forum on this subject, seems the experiments were between two boards, back-to-back, and not between a board and PC, due to both hardware and software problems. About even parity - not unusual, some protocols/applications uses that. About the code posted: usually it is recommended that after enabling the peripheral to wait for a while (which is done) and after that, use UARTDisable() function before doing fur
  25. Hi, Unfortunately more documentations about CCS asm cannot be found, except a practical example which exercise several possible directives to write .asm file. These are to be found in Tiva/boot-loader/bl_startup_ccs.s file. As for IT instruction here are some aspects of using this: In IT instruction blocks, the first line must be the IT instruction, detailing the choice of execution, followed by the condition it checks. The first statement after the IT command must be TRUE-THEN-EXECUTE, which is always written as ITxyz, where T means THEN and E means ELSE. The second through fourth state
×
×
  • Create New...