Skip to content

Latest commit

 

History

History
70 lines (27 loc) · 1.84 KB

README.md

File metadata and controls

70 lines (27 loc) · 1.84 KB

PicProg - Programming Microchip PIC16(L)F184XX based on STM32F3Discovery board

Notes:

  • PicProg consists of two parts - STM32F303VC code part (folder picprog4) and Windows10 interface part (folders picprog and WPicProg) .

STM32F303VC

  • MCLR, ICSPCLK and ICSPDAT of PIC must be connected to PB2, PB4 and PB5 of STM32F303VC

  • USB DM uses PA11, USB DP uses PA12.

  • You can change port mapping by editing main.h or STM32CubeMX configuration.

  • Use no optimization while compiling (option -O0)

  • You can use STM32CubeMX for generating code - picprog4.ioc containsSTM32CubeMX configuration information. After code generation comment this lines:

    main.c - function main(void), section "Initialize all configured peripherals" :

      	MX_USB_DEVICE_Init();
    

    stm32f3xx_hal_msp.c - function HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) :

      	__HAL_LINKDMA(htim_base,hdma[TIM_DMA_ID_UPDATE],hdma_tim3_ch4_up);
    
      	__HAL_LINKDMA(htim_base,hdma[TIM_DMA_ID_TRIGGER],hdma_tim3_ch1_trig);
    

    stm32f3xx_it.c - function DMA1_Channel2_IRQHandler(void) :

      	HAL_DMA_IRQHandler(&hdma_tim3_ch3);
    

    stm32f3xx_it.c - function DMA1_Channel3_IRQHandler(void) :

      	HAL_DMA_IRQHandler(&hdma_tim3_ch4_up);
    

    stm32f3xx_it.c - function DMA1_Channel6_IRQHandler(void) :

      	HAL_DMA_IRQHandler(HAL_DMA_IRQHandler(&hdma_tim3_ch1_trig);
    

Interface

  • PicProg interface uses ".elf" file as a source of code to be programmed.

  • PicProg interface uses ELFIO library. Please include path to ELFIO files in your compiler -I option.

  • This interface version runs under Windows 10. picprog.exe - command line version and WPicProg.exe - GUI version.

  • Command line version:

picprog.exe COMname <full path to .elf file>

COMname - COM1, COM2 ….. COM99 - virtual COM port, connected to STM32F3Discovery.