Any success with programming so far?
Not much time right now. I just got ADC working properly (was mistake with a resistor in schematic). Next part is trying to reduce ripple (everything is a bit noisy right now so I will play a bit with different cap values / adding some caps).
For programing I'm swapping pins around so the hardware SPI and a complete TIM is available on right pins.
Well, it looks like we are stuck with "printf debugging" with the Padauk controllers though. One thing I implemented was to use the programming interface as an SPI backchannel. The "programmer" (I am referring to my breadboard contraption) is resetting the MCU and is then listening to SPI transmissions on the programming interface lines as a slave. This allowed some degree of debugging. This may be an interesting addition to the firmware of your programmer as well.
Excellent idea / addition. This can be added to the programmer USB protocol as a debug channel.
But do you think SPI is a good choice? I used it in a previous test and had the problem that if a single bit was missing (e.g. after startup) the complete output was garbled.
spth made a small demo with a very simple UART. Maybe we should choose this method as it can handle transmission errors more easy (e.g. require 2 stop bits and we can resync).
Or we use SPI with CS(NSS) but then 1 more wire required.
JS
UPDATE:
This is the hardware mapping I have available after swapping pins:
STM_PB3: SPI1_SCK / TIM2_CH2 (IC_PA3)
STM_PB4: SPI1_MISO / TIM3_CH1 (IC_PA4)
STM_PB5: SPI1_MOSI / TIM3_CH2 (IC_PA6) (SPI slave mode on STM uses MOSI to get data from IC)
STM_PB6: UART1_TX / TIM16_CH1N (IC_PA0)
STM_PB7: UART1_RX / TIM17_CH1N (IC_PA7)
* IC_PA3 requires to have the SPI1_SCK, also the dedicated TIM is required to capture input pulses during calibration (note: TIM2 additional channels can not be shared with PWM or other functions)
* IC_PA4 requires SPI1_MISO (input of IC <= output of STM32)
* IC_PA6 requires SPI1_MOSI (output of IC => input to STM32)
* UART1_TX / UART1_RX can be used for debugging and also for serial boot loader of STM32, no special requirement for IC pins