Jump to content
43oh

Lyon

Members
  • Content Count

    193
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Lyon

  1. Lyon

    SSI and LM4F120XL

    Hi, The result of the operation should be 0x94 if want to read the register 0x14. Your example is by default in advantage. What about an address 0x64? Shifting alters the content... Also, the configuration mentionned is in Table 5, page 9. L
  2. Lyon

    SSI and LM4F120XL

    Hi, Please think again and review Table 8 in chip's data sheet. Only masking (AND ) with 0x7E clears bit 0 and 7, leaving bits 6..1 unaltered. Shifting to the left moves bit 6 in position 7 and in fact all content is altered. Also, did you set the hardware correctly? I mean pin I2C=0 and pin EA=1 to automatically configure for SPI interface? Modes 0 and 3 are the ones accepted. L
  3. Lyon

    SSI and LM4F120XL

    Hi, Again about your expression of register 0 address: why do you shift left? It is not needed, just need to be masked with 0x7E and then set/clear bit 7. L
  4. Lyon

    SSI and LM4F120XL

    Hi, Seems the mode 3 is same as mode 0 - but mode 3 should show 16 consecutive clock pulses without pause, same the Enable signal - should not rise up between bytes - clearly you must modify something in your routine - this expression: while(SSIBusy(OUR_SSI)); should be eliminated - each function SSIDataPut waits inside for not busy, so no need for extra waiting. Also, the transmission sequence should be SSIDataPut, SSIDataPut, SSIDataGet, SSIDataGet - also the *Get function is with waiting. This apply also for mode 0. What is OUR_SSI? (is it SSI3 or not?) Check also the waveforms - if y
  5. Lyon

    SSI and LM4F120XL

    Hi, Yes, it is possible to use RTC interrupts for counting seconds, without hibernation. L
  6. Lyon

    SSI and LM4F120XL

    Hi, One more important thing: the spma289.pdf document (Launchpad document/schematic) shows the PD0 connected to PB6 with R9=0 ohms and PD1 connected to PB7 with R10=0 ohms. If you have another signals on PBx pins, remove R9 and R10. Not clear what you to intend to do with RTC - what are your needs - either a watch/clock or something else. L
  7. Lyon

    SSI and LM4F120XL

    Hi, You got it - for mode 3 -it is what I meant. As for RTC - if you do not need it, do not add that code. Also do not move it in hibernation mode when you need to use the SPI. L
  8. Lyon

    SSI and LM4F120XL

    Hi, I realized you use the system clock at 80MHz and SPI clock at 1MHz so if that observation is really for TM4C123x micros, then you may be in that particular nasty situation. Why not try to increase to 2MHz? Can you also change to mode 3? Also, you said "and i use RTC." What should I understand for that? Are you in hibernating mode when calling SPI reading? L
  9. Hi, Found on web several postings related to some available, but unused hardware on Cortex-Mx processors (unused on some platforms, available on others. Adapted for TM4C as below: #include "inc/hw_nvic.h" /* for definition of NVIC_DBG_INT */ #include "inc/hw_memmap.h" /* for definition of DWT_BASE */ #include "inc/hw_types.h" /* for definition of HWREG */ #define DWT_O_CYCCNT 0x00000004 static uint32_t c_start, c_stop; // declaration of an initialization function void EnableTiming(void); // definition of that function /*************************************
  10. Lyon

    SSI and LM4F120XL

    Hi, Then maybe one solution to check your SPI configuration: use the PinMux utility to generate the code for you and compare it with yours. Also check if PD needs some commiting ( attention: PD7 is NMI). Do not neglect some hardware problems - although I can see from the picture that SPI TX pin toggles. L
  11. Lyon

    SSI and LM4F120XL

    Hi, Your expression should be: val = ( addr << 1 ) | 0x80 ; for reading data - this is what the data sheet suggest: The address byte must meet the following format. The MSB of the first byte defines the mode used. To read data from the MFRC522 the MSB is set to logic 1. To write data to the MFRC522 the MSB must be set to logic 0. Bits 6 to 1 define the address and the LSB is set to logic 0. Table 8. Address byte 0 register; address MOSI 1 = read 0 = write This is paragraph 8.1.2.3, page 11. L
  12. Lyon

    SSI and LM4F120XL

    Hi, Please review this expression: val = ( addr << 1 ) & 0x80 ; And-ing with 0x80 clears all seven bits in your val variable. Since neither the eight one was set after <<, you send always 0. L
  13. Hi, You may start by downloading OpenOCD for Windows from here (use binary package since the compilation on Windows is difficult): http://www.freddiechopin.info/en/download/category/4-openocd Note the last version, 0.7.0, is working for TM4C123x/LM4Fxxx micros - has all modifications needed. The trick to make it working with Win systems is to instruct the device manager in Windows to ignore all USB connection of this board, since OpenOCD uses it own USB library. How to install and use it from command line is best described in this page: http://processors.wiki.ti.com/index.php/Stellaris
  14. HI, How do you intend to use the gdb? aka you are a command line user or need to use windows/graphical environment to debug? Also what you tried and wasn't OK? I can post for you several links to read - but almost all are for Eclipse configuration + OpenOCD ( this is what I am using on Win and OSX) if this is OK for you - I would like to know first. L
  15. Hi, @pabigot: again, you are right - after a second taught, yes, it is a global interrupt enable. It seems I over-reacted to the expression "global…" and failed to express the right things - taught is always faster than the hand - ... The nice feature added is the BASEPRI register - this one helps to filter more the interrupts and allowing to work without disabling them, neither globally, neither individually. Thanks for the link, I already know Miro's blog, but the last six month i did not opened. Regards, L
  16. @pabigot: Yes, you are right - I just peaked up the wrong example. As for the operation "bad" order in Tiva, I have no idea - I always try to write in order... Regards, L
  17. Hi, I am speaking for myself, not part with any brand - each approach has its own advantages and disadvantages. You may use whatever you need or think is more appropriate to your application. CMSIS is more permisive in terms of its licence - you may use it in both commercial and non-commercial applications. However, its price, as noted by @@pabigot, is the code size and of coarse the execution time. This expression: GPIOA->AFSEL |= GPIO_PIN_0 | GPIO_PIN_1; for instance is of the type read-modify-write sequence, so it induces some penalty in code size and of coarse execution time, sinc
  18. Hi, First, you cross-posted on e2e tiva-arm site - and I prefer to highlight you here some problems: 1) According to the user manual, page 560: In Edge-Time mode, the timer is configured as a 16-bit down-counter. In this mode, the timer is initialized to the value loaded in the GPTMTnILRregister. The timer is capable of capturing three types of events: rising edge, falling edge, or both. So your configuration of Timer 0 must be changed, two timers, split configuration. On 9B90 there are no alternative to that - this is Stellaris. One timer will be enough. With two timers you will h
  19. Hi, These problems are related to quiet transition to C99 standard - as this one specify a lot of new types, including uint32_t, uint64_t and so on. Seems to be more changes - including for printf function - a new type intmax_t must be defined for every platform, and printing is solved with new flags: printf("%jd\n", (intmax_t)n); Depending on your tools, you can always specify the C99 standard to comply with all these... Regards, L
  20. Hi, I do not have experience with OSX 10.6.8 - I use 10.7.5 (L) - and for TI - Stellaris /Tiva processors worked for me the following: 1) USB prober to find out everything about a particular board/interface attached to USB port 2) In terminal window, you may try this: ls /dev/tty.usbmodem* to list all devices - TI boards shows as /dev/tty.usbmodem0xxxxxxxx, where 0xxxxxxxx is the serial number of the board, in hex. Note: other boards do not shows that (e.g STM32 Discovery, but is detected by USB Prober). Also for TI boards, /dev/cu.usbmodem0xxxxxxxx was found. I managed to use these boar
  21. Hi, Go to Project | Properties | CCS Build | ARM Linker -> File Search Path and there are two half windows to be modified. In the upper part add these two lines, one by one: "libc.a" "${SW_ROOT}/driverlib/ccs/Debug/driverlib.lib" These are my settings - check for yours (name and locations may differ - here are mines using Tiva 1.1) And in the lower half add these lines, also one by one: "${CG_TOOL_ROOT}/lib" "${CG_TOOL_ROOT}/include" Note it is wise to make a separate driverlib project and compile the whole library for your processor. L
  22. Hi, The error "undefined Symbol" means you did not provided a declaration for that function AND the definiton (body). You can do that in two ways: 1) add the driverlib.lib to your project, usually on the linker library tab. 2) prefix each (missing) function with ROM_ to be linked automaticaly to your project, since all driverlib functions reside also on-chip. Take into account each solution has also some other steps to do before the mentioned step above. For instance, for solution 1) it is wise to make a separate driverlib project compiled specifically for you dedicated microcontroller.
  23. Hi, Spirilis, congratulations for the idea, it is very good. As for your comments, I have two small observations: 1) ref yours #2: as far as I know, up to now, on TI boards is implemented only JTAG interface ( ICDI knows only that) but seems to be changing on TM4C129 boards. Other providers (IAR, Segger) implemented both JTAG and SWD on their uLink2 devices. 2) ref yours #4: no, PRIMASK is not a replacement for global interrupt enable. This is still present and can/must be used with IntMasterEnable() function which is a wrapper to the asm instruction cpsie. The purpose of PRIMASK is to enh
  24. Hi, As far as I remember, in the software packages delivered by TI there is an PC application to communicate with your board. That is open source - it is written in C and compile with Mingw. You have there all structure and all comands. One suggestion - as I made also applications with C#, today I would not - try the Fluid approach as used by TI - seems faster and better and is not related to a single platform... L
  25. Hi, To answer your questions: start first with TI's user manual to know peripherals. I should say: " A chapter a day, keeps the forum away" - this is the known fact these days the user manuals are very big, so one chapter each day is better, since you need to read it several times. Every time you can read also the ARM manuals - but these are made as for a " industry standard" they are a little bit harder to swallow. A second approach is to use the TI's ready made applications - and understand how are made and how the peripherals are used. Third - since it seems you are pressed to use on-boa
×
×
  • Create New...