Jump to content
43oh

M-atthias

Members
  • Content Count

    69
  • Joined

  • Last visited

  • Days Won

    6
  1. Dear TI geeks, Ulrich Hoffman found a bug while using multitasking in Mecrisp-Stellaris on TM4C1294, which, after a long search, could be tracked down and turned out to be a silicon bug. I wish to share this with you, just in case you run into similiar trouble. Matthias LDMIA and some other opcodes with a register list can be interrupted and continued afterwards in M3 and M4 cores. Unfortunately, there seems to be a silicon bug in some chips / core revisions that causes an interrupted LDMIA opcode to fail. The error has already been observed in LM4F120, TM4C1294, STM
  2. Mecrisp is a native code Forth for MSP430 cores and Mecrisp-Stellaris runs on ARM Cortex M0, M3, M4. Forth is a programming language with two stacks and an extendable compiler which has been designed decades ago for controlling a radio telescope in astronomy and shows its strengths in microcontrollers, too. Its most interesting feature for embedded programming is that the compiler runs inside of the microcontroller and you basically chat with it over a serial terminal line or any other link you can imagine and implement. You can wiggle your wires manually, experiment with fresh peripherals and
  3. I wish you happy Easter, of course with a small surprise: I just conquered the MSP432P401R with Mecrisp-Stellaris and I wish to announce quite fresh ports of Mecrisp for MSP430FR4133, MSP430FR5969 and MSP430F5529. Enjoy :-) Matthias
  4. Main Clock tree in section 5.2.5.2 shows a direct PIOSC line to the ADC CS, just as expected. Finally, section 15.3.2.7 gives an hint: 16 MHz PIOSC. Using the PIOSC provides a conversion rate near 1 Msps. To use the PIOSC to clock the ADC, first power up the PLL and then enable the PIOSC in the CS bit field in the ADCCC register, then disable the PLL. Stange procedure, but now it finally works. Thank you for pointing me to the right section ! Next release of Mecrisp-Stellaris will finally include an ADC example. PS: Mecrisp-Stellaris is written in bare metal assembly and not compatible wit
  5. In section 15.4 "Initialisation and Configuration" of chip datasheet nothing is said about the need to set clock registers. But I tried nonetheless: #define ADC_CLOCK_RATE_FULL 0x00000070 #define ADC_CLOCK_RATE_HALF 0x00000050 #define ADC_CLOCK_RATE_FOURTH 0x00000030 #define ADC_CLOCK_RATE_EIGHTH 0x00000010 #define ADC_CLOCK_SRC_PLL 0x00000000 #define ADC_CLOCK_SRC_PIOSC 0x00000001 #define ADC_CLOCK_SRC_ALTCLK 0x00000001 #define ADC_CLOCK_SRC_MOSC 0x00000002 #define ADC_CC_CS_M 0x0000000F // ADC Clock Source ADCClockConfigSet(ADC0_BASE,
  6. This is all my hardware startup code accompanying the example above. All other IO registers are on Reset default. movw r1, #0x7FFF @ Activate clock for all GPIOs ldr r0, =RCGCPIO str r1, [r0] movs r1, #1 @ Activate clock for UART0 ldr r0, =RCGCUART str r1, [r0] movs r1, #0x11 @ Set special function for PA0 and PA1 ldr r0, =GPIO_PORTA_AHB_PCTL_R str r1, [r0] movs r1, #3 @ Set special function for PA0 and PA1 ldr r0, =GPIO_PORTA_AHB_AFSEL_R str r1, [r0] @ movs r1, #3 @ Set special function for PA0 and PA1 ldr r0, =GPIO_POR
  7. Clock source for this failing example is 16 MHz PIOSC, which is default for ALTCLKCFG, which is default for ADC clock on TM4C1294. I already checked for those 16 MHz by generating an interrupt driven square wave with Systick timer. PLL and MOSC XTAL are off, UART0 is running on PIOSC, too. Tivaware examples unfortunately are of limited help for me as the calls diffuse within a huge library - I already banged my head against the adc.c in driverlibs. Do you know "direct register" examples for TM4C1294 ? Matthias BTW, off-topic: I found out that the simple ethernet transmit descriptors are non
  8. Dear Stellaris geeks, I am porting code from LM4F120 Stellaris Launchpad to TM4C1294 Tiva Connected Launchpad. I found the literature SPMA065 "Differences Between Tiva C Series TM4C Microcontrollers" which states that analog-digital converters in TM4C1294 only add features relative to TM4C123 / LM4F120. But I cannot make my ADC code work. To nail it down I have done this minimal example code in Forth (Mecrisp-Stellaris 1.1.5): $400FE638 constant RCGCADC : init-analog ( -- ) $1 RCGCADC ! \ Provide clock to AD-Converter \ PIOs already activated in Core 50 0 do loop \ Wait
  9. Frequency accuracy depends on how far off your crystal is. The closer the crystal matches the frequency, the finer the available calibration steps are. On my STM32F407 Discovery, the crystal is 74ppm too fast. Besides from this, the simple convolution receiver code included has 1 us time steps, but could changed for more precision at cost of more calculation time. eLoran enhancements are currently not included in first release :-) This is a basic old-style Loran-C receiver to be build with a common STM32F407 board and a longwave antenna. For eLoran all-in-sight recording we would need (much)
  10. Happy new year ! Loran-C radio navigation now runs on STM32F407 - thank you for the hint. As this will be a bit off-topic here I announced it on Stellarisiti: http://forum.stellarisiti.com/topic/1807-loran-c-radio-navigation/ Matthias
  11. Happy new year ! I am happy to announce a software defined Loran-C longwave radio navigation receiver running on STM32F407 ! If you happen to live somewhere on earth with Loran-C signal coverage like Europe and parts of Asia, I would like to get in contact with you for beta testing out in the wild. The first experimental release is available now on download section on http://mecrisp.sourceforge.net/ Best wishes, Matthias
  12. I just discovered the above Boot430 implementation out into the wild :-) Great ! http://programmablehardware.blogspot.de/2013/11/homebrew-msp430-development-board.html Best wishes, Matthias
  13. I have done a similiar experiment while writing Mecrimus-B. I adjusted DCO settings manually with a frequency counter and connected to USB. My observation was that I could break the connection due to DCO frequency change by touching the chip with a warm finger or by breathing against it.
  14. Good morning to Italy - I like your project a lot ! Mecrimus-B already defines a mouse, it is constantly moving the pointer to the right, but adding buttons should be simple if you feel comfortable with assembly. Replace this sequence in Mecrimus-B-32768Hz.asm with button states - movements are 8-bit signed integers, moving to the left would be -1=255: mov.b #0, &Irq_In_Sendepaketpuffer+2 ; Buttons pressed mov.b #1, &Irq_In_Sendepaketpuffer+3 ; X movement mov.b #0, &Irq_In_Sendepaketpuffer+4 ; Y movement mov.b #0, &Irq_In_Sendepaketpuffer+5 ; Wheel movement Replace t
  15. Fine, one more issue solved. Yes, toggle_syncled can be replaced by a 4 cycle nop.
×
×
  • Create New...