Armmite - STM32H7: Developments


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 3880
Posted: 03:40pm 13 Jun 2018      

All change I'm afraid V5.04.08

2018-06-14_013523_Armmite.zip

The performance of the SD card was not good enough using the SPI inteface so I have converted the code to use the full 4-bit parallel SD card interface. I've also implemented full audio output using the on-chip DAC.

This is a major rework of the codebase as I have converted from a hack of a demo program to a full start-from-scratch CubeMX project (in other words bugs are possible/likely).




The revised pinout is as follows:

PF6, PF7, PF8, PF9: are now available for general use.

PC8: SD-D0 (pin-98)
PC9: SD-D1 (pin-99)
PC10: SD-D2 (pin-111)
PC11: SD-D3 (pin-112)
PC12: SD-CLK (pin-113)
PD2: SD-CMD (pin-116)
PG2: SD-CardDetect (pin-87)
The SD pins are dedicated and may not be used for anything else.

These pins are all available on CN8 (labelled SDMMC) in the order above from the top right of the connector down.

The Dac pins are:

PA4: DAC1 (pin-40)
PA5: DAC2 (pin-41)
The DAC pins are dedicated and may not be used for anything else.

These are available on CN7 (D13 and left of D8)

Audio commands supported are as per the MMX

PLAY TONE f1, f2 [,duration]
PLAY WAV "filename" [,interrupt]
PLAY FLAC "filename" [,interrupt]
TTS string$

In addition the DACs can be used directly from Basic when not otherwise in use.

DAC n, voltage 'n=1 or 2, voltage = 0-3.3

Dim s(359),c(359)
For i=0 To 359
s(i)=(Sin(Rad(i))+1)*1.65
c(i)=(Cos(Rad(i))+1)*1.65
Next i
Do
For i=0 To 359
DAC 1,s(i)
DAC 2,c(i)
Next i
Loop
Edited by matherp 2018-06-15