Jump to content

dipCoreF4 and dipBoardF4, a compact Core.


Antichambre

Recommended Posts

If I remember well, the pins I crossed on the first proto were J16.SI and J16.SO. J8/9 seems good on your schematic but pin 40 and 39 are still reversed!!!
39 ->J16.SO
40 ->J16.SI

More than that I added the USB Host, it doesn't appear on your pinout.
Note: USB HOST supports:

  • USB MIDI Device.
  • USB HID Keyboard and Mouse.


attached the eagle lib.

dipCoreF4_v2b.lib

 

Edited by Antichambre
Link to comment
Share on other sites

Sorry not the good lib!
This one is fine:

dipcore_usb.png?raw=1

USB1(old) FS, Device/Host, this is the one you have to use, ID is floating for Device Mode, ID to GND for HOST
41 - USB1.ID = ID pin for USB1
46 - VBUS = VBUS for USB1
43 - USB1.DP = USB1 D+
48 - USB1.DM = USB1 D-

USB2(new) HS in FS Mode, Host only.
44 - USB2.DM = USB2 D-
45 - USB2.DP = USB2 D+
49 - USB2.OC = Input for external overcurrent sensor.
50 - USB2.EN = Ouput for external power switcher

dipCoreF4_v2c.lbr

Edited by Antichambre
Link to comment
Share on other sites

ok then i  take J16 RC2 (PA4) and J16 RC1 (PC4)

which are used for SD-Card - which i dont need here. so i gues MIOS32_DONT_USE_SDCARD ?

 

@ Type DEF - is this done like on J10 for example:

MIOS32_BOARD_J10_PinInit(0, MIOS32_BOARD_PIN_MODE_OUTPUT_PP);

MIOS32_BOARD_J10_PinSet (0, 1);

for me Clear how to make it with J5 and J10

 

>>>

MIOS32_BOARD_J16_PinInit(0, MIOS32_BOARD_PIN_MODE_OUTPUT_PP); ???

 

thx

 

Link to comment
Share on other sites

for J16 which is a SPI port

  MIOS32_DONT_USE_SDCARD
  MIOS32_DONT_USE_SPI0

Init

// common
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
// J16.RC2 as GPIO (PA4)
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
GPIO_Init(GPIOA, &GPIO_InitStructure);
// J16.RC1 as GPIO (PC4)
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
GPIO_Init(GPIOC, &GPIO_InitStructure);

then to set or clear the pins you can use the macro:

// MIOS32_SYS_STM_PINSET(port, pin_mask, value)
// e.g.
MIOS32_SYS_STM_PINSET(GPIOA, GPIO_Pin_4, 0)
MIOS32_SYS_STM_PINSET(GPIOC, GPIO_Pin_4, 1)


 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

hmmm... serios problems here
 

when i connecting the dipcore

via Dipcores-onboards USB-Socket to my Laptop (lenovo thinkpad t440p, linux mint):

i get after a few seconds after booting up a:
 

!! HARD FAULT !!

at PC=0x0801afd4

or it doesnt boot at all

it doesnt matter if the Laptop is on battery only, or with PSU-connected (so it isnt a noisy psu)

I doesnt measured a Voltage Dropdown on the USB-RAIL (measered on the PTC) while Hardfaul accours...

i doesnt Activated "Midi via USB" since config is:

#define MIOS32_USE_MIDI
#define MIOS32_USE_UART
#define MIOS32_USE_UART_MIDI
#define MIOS32_UART_NUM 1
#define MIOS32_UART0_ASSIGNMENT 1 //1=Midi, 0= Disabled, 2= COM
#define MIOS32_UART1_ASSIGNMENT 0
#define MIOS32_UART2_ASSIGNMENT 0
#define MIOS32_UART3_ASSIGNMENT 0

(right?)

it doesnt fault (no time) when i connect the same USB to a Mobilphonecharger (2A)

and it doesnt fault ... when running (almost) the same app  on LPC17    >   CV1 ok that tell us NOT much, because the LPC17 is no STM32 chipset...

... also most of the time the Dipcore isnt regognized via MIOS-Studio  - i have to go into Bootload Mode(via Switch) to upload new code.... (i dont scan any J5 or other GPIOs which could force floating data mess)

--- i updatet today the repo from your github... so its actual ( i cant say if it worked before... its long ago since i codet on a dipcore)

 

i tried different USB ports from my laptop, also the one Port which is a "always on to charge whatever usb) make the same hard fault

 

The app doenst boot up on a windows 10 Desktop PC at all (no time!) (no screen content on the SSD1306)

on a other windows 10 Desktop it boots, but it Hardfaults the same way like on my Linux laptop.

 

i bridget the VBAT! (use SD-Card and SSD1306!!!), because i have to supplay a "motherboard" > CV-1-Shematic.pdf

 

i already had deactivated all SD-Card Routines, and Scan Routines, but the machine hangs on almost "background" tasks... so i turned it on again.

here is the APP i programm...

CV-ONE-V0.zip

 

==============================================================0

 i use the bootloader from here: http://wiki.midibox.org/doku.php?id=dipcoref4 >

(i dont change anything in bootloader via Terminal --- i changed the display settings within the app --- so its almost stock)

http://wiki.midibox.org/lib/exe/fetch.php?media=antichambre:dipcoref4_bootlader.zip

i updatedt today the mios repo from: https://github.com/antichambre/MIOS32

gcc-arm-none-eabi is still from 2013 ( i dont updatet anything there)

and of course the environment variables are set correct:

MIOS32_PATH=~/midibox/mios32
MIOS32_BIN_PATH=$MIOS32_PATH/bin
MIOS32_BOARD=MBHP_DIPCOREF4
MIOS32_FAMILY=STM32F4xx
MIOS32_GCC_PREFIX=arm-none-eabi
MIOS32_PROCESSOR=STM32F405RG
MIOS32_LCD=universal

the app is functional as i said but not on computers... on smartphone chargers i dont get a Error!

 

Edited by Phatline
Link to comment
Share on other sites

10 hours ago, Phatline said:

i doesnt Activated "Midi via USB" since config is:


#define MIOS32_USE_MIDI
#define MIOS32_USE_UART
#define MIOS32_USE_UART_MIDI
#define MIOS32_UART_NUM 1
#define MIOS32_UART0_ASSIGNMENT 1 //1=Midi, 0= Disabled, 2= COM
#define MIOS32_UART1_ASSIGNMENT 0
#define MIOS32_UART2_ASSIGNMENT 0
#define MIOS32_UART3_ASSIGNMENT 0

(right?)

 

#define MIOS32_UART_NUM 1

This line is enough.

Link to comment
Share on other sites

I updatete the repo, and deletedet the uneccersery  lines in mios-config.

 

its no long test, but on the moment its running without HARD-FAULT, and it is recognized in Mios-studio without Bootload-Mode! thx!

BUT

now Display1 stays dark, it is connected to Pin 33, PB12-J15.CS1   (it was working bevore)

Display 2 is working, it is connected to PIN 27, PC0-J15.CS2

Edited by Phatline
Link to comment
Share on other sites

18 minutes ago, Phatline said:

now Display1 stays dark, it is connected to Pin 33, PB12-J15.CS1   (it was working bevore)

I didn't touch that
Be sure the MIOS32_LCD is universal, I know you put the values in MIOS32_config but try also to set them with booloader updater help, set lcd_type too...

Edited by Antichambre
Link to comment
Share on other sites

4 hours ago, Antichambre said:

I didn't touch that
Be sure the MIOS32_LCD is universal, I know you put the values in MIOS32_config but try also to set them with booloader updater help, set lcd_type too...

and i didnt change anything except deleting the Midi-lines in MIOS-Config, and updateting the Repo.

i uploadet the Bootloader app again, to change the Display settings manually, but they are already set, like it was bevore (where it was running), buy changing the type from rotating (which i need) to not rotated for example did not change the problem, or by changing the lcd_num x to 1 (two i had)... . no Picture on Booth SSD1306 when using the bootloader app, one display when use-ing my app.

bootload-settings.png

 

i also restored my mios-config settings as they where before... but still one display!

 

I swapped (mios config side) Y to2, and X to 1 - and now it works.... I dont understand this, it was a  X2 Y1 bevore. (crazy)

 

 

ok later the day one display fault again.... (same code) i measured the "Reset" Resistor (1K) and i had 760OHM... the Reset Voltage was about 2.5V.... on the working Display i had 3.3 Volt - and a Resistance from 980 Ohm.... (1Ks are installed)... so i cleaned  the soldering Points of the display, after removing the FLUX i got a Working LCD and a Voltage from 3.3V .... low impadance Flux - GOOD NIGHT!

Edited by Phatline
Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

i guess not

the pyboard uses a 12Mhz external crystal? and Mios32 needs?

look at the Pinout:

http://wiki.midibox.org/lib/exe/fetch.php?media=antichambre:pinout_compare_chart2.png

a quick look at for example the SD-Card Pins - of the pyboard and on Dipcore or Discovery stm32F407VG - says that the use other GPIO to do things...

So yes you may flash that pyboard, but the Mhz might not be right (aka need to replace the oscillator)

So yes you might run MIOS afterwards... but you cant use for example the onboard SD-Card - because it is wired to other pins... you have to DO the work that antichambre did (change the GPIO ports in MIOS, make a new toolchain, and that is a Job for someone who knows what he does -  i would be very happy if i could do that - or someone introduce that skill to me- but i dont have any glue about that)

  • Like 1
Link to comment
Share on other sites

Hi,
Mike is right, not like it is!
Crystal frequency change will oblige to change the configuration of the STM deeply to get its perpherals work at the right speed, the sd card uses quad spi instead of single one it's a new module to write, remap all pins etc etc...
Recompile a new bootloader because finally you will need you own version of MIOS32 to make it run. It's possible if you've got time and knowledge(or still more time to learn it).
BR
Bruno

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...