Antichambre

dipCoreF4 and dipBoardF4, a compact Core.

96 posts in this topic

1 hour ago, Phatline said:

> on DipCore PC6+PC7 you handle as LED (DOUT) - how to call them in MIOS? > as Board LEDS? aka "MIOS32_BOARD_LED_Set(0,1);" ) > see http://www.midibox.org/mios32/manual/group___m_i_o_s32___b_o_a_r_d.html#ga46e21f1170f1876435f40d65977c6a83

Yes it is! The 2 lsb bits

/////////////////////////////////////////////////////////////////////////////
//! Sets one or more LEDs to the given value(s)
//! \param[in] leds mask contains a flag for each LED which should be changed
//! \param[in] value contains the value which should be set
//! \return 0 if initialisation passed
//! \return -1 if no LEDs specified for board
//! \return -2 if one or more LEDs not available on board
/////////////////////////////////////////////////////////////////////////////
s32 MIOS32_BOARD_LED_Set(u32 leds, u32 value)
{
#if defined(MIOS32_BOARD_STM32F4DISCOVERY) || defined(MIOS32_BOARD_MBHP_CORE_STM32F4)
#if MIOS32_BOARD_J15_LED_NUM >= 1
  if( leds & 1 ) { // LED4 (Green)
    MIOS32_SYS_STM_PINSET(GPIOD, GPIO_Pin_12, value & 1);
  }
#endif
#if MIOS32_BOARD_J15_LED_NUM >= 2
  if( leds & 2 ) { // LED3 (Orange)
    MIOS32_SYS_STM_PINSET(GPIOD, GPIO_Pin_13, value & 2);
  }
#endif
#if MIOS32_BOARD_J15_LED_NUM >= 3
  if( leds & 4 ) { // LED5 (Red)
    MIOS32_SYS_STM_PINSET(GPIOD, GPIO_Pin_14, value & 4);
  }
#endif
#if MIOS32_BOARD_J15_LED_NUM >= 4
  if( leds & 8 ) { // LED6 (Blue)
    MIOS32_SYS_STM_PINSET(GPIOD, GPIO_Pin_15, value & 8);
  }
#endif

  if( leds & 0xfffffff0)
    return -2; // LED doesn't exist

  return 0; // no error
#elif defined(MIOS32_BOARD_DIPCOREF4)
#if MIOS32_BOARD_J15_LED_NUM >= 1
  if( leds & 1 ) { // LED0 (Green)
    MIOS32_SYS_STM_PINSET(GPIOC, GPIO_Pin_6, value & 1);
  }
#endif
#if MIOS32_BOARD_J15_LED_NUM >= 2
  if( leds & 2 ) { // LED1 (Orange)
    MIOS32_SYS_STM_PINSET(GPIOC, GPIO_Pin_7, value & 2);
  }
#endif
  if( leds & 0xfffffffc)
    return -2; // LED doesn't exist
  
  return 0; // no error
#else
  return -1; // no LED specified for board
#endif
}

 

 

 

1 hour ago, Phatline said:

> the PTC you used on DipCore what SMD Package is it? ( i want take the same as on DipCore... dont want to buy 2 different parts)

1206 package

PTC_1206L_series_SPL.jpghttps://www.mouser.fr/ProductDetail/576-1206L150THWR

1 hour ago, Phatline said:

> since i will be ready soon with the cc_looper - will order Protoboards for it the next days - i assume nothing changed on the Pinout of the DipCore until now > so i can order?

No, dipCoreF4 pinout will not change... I'm working on something which will maybe change STM pin assignation. but dip-40(48) will keep the same pinout and function.
Try to do not put any component in the dip40 area. It is possible that I add some feature and pin, somewhere in the alignment of 41-43 or 44-48.

Best
Bruno

Edited by Antichambre

Share this post


Link to post
Share on other sites
On 14/09/2018 at 9:32 PM, Phatline said:

> since i will be ready soon with the cc_looper - will order Protoboards for it the next days - i assume nothing changed on the Pinout of the DipCore until now > so i can order?

On 14/09/2018 at 10:50 PM, Antichambre said:

No, dipCoreF4 pinout will not change... I'm working on something which will maybe change STM pin assignation. but dip-40(48) will keep the same pinout and function.

Hi,

After some try, I'm able to use the second USB OTG, the USB_OTG_HS in full speed with the embedded FS phy.

The idea is to keep the USB_OTG_FS as it is in dual role with ID pin. And add the USB_OTG_HS in FS Host Only, to connect a B-device only.

It works fine for HID(Keyboard and Mouse), I will complete the classes with MSC(Mass Storage), maybe MIDI of course.

Here, MIOS Studio is connected in USB(normal one) and I plug a mouse first then a keyboard to the other USB:
( did this test with a modified wCore)
Capture%20d%E2%80%99%C3%A9cran%202018-09
This is very difficult too implement on a mbhp disco or wCore cause the DP/DM pins are used for J8/9 SI/SO(PB14/PB15). BUT! I can do it on the dipCoreF4, by moving SI/SO on other alternate function pins.

=> Then like I said I will make some changes on the STM32F405 pins and on MIOS32 side. Add pins for DP/DM and Over-current/VBUS Drive GPIO of the second USB on the dip40(other extra pins).

Host%20Only.png?raw=1

And modify the dipBoardF4 for that purpose of course.

Have a good WE
Best Bruno

 

 

Edited by Antichambre
1 person likes this

Share this post


Link to post
Share on other sites

hey

i am working on a new project "Konga Trigga", and i want to reuse the DipCoreF4 for that again... since it is really handy :cheers:

i need 3 Digital Inputs (used as Trigger inputs  -  feedet with Schmitt-Trigger Digital Signals)

 

i dont want to connect them via a slow shift register - since it is trigger > it is time critical.

As far as i can see i can use J5.A0(PA1)  +  J5 A1(PC5) > and set them in Mios as Digital Input, makes 2

so only one Digital input left - is there any other Pin i can use as DIN? (LED.1, LED.0 for example?)

 

User.Butt (PA0) > is for Bootloader Switch  - maybe that one?

Share this post


Link to post
Share on other sites

Hi Phatline,

You can use the pin you want, all pins are GPIO as first function.
Just don't take something already used(SDcard, midi, etc..). You want input then don't use 5V level output pin(SC, SO, RC) like the one of J19 or J8/9, they can not be input. But you can use J4 for example.

Best regards
Bruno

1 person likes this

Share this post


Link to post
Share on other sites

thx!

so

PB6-J4A.SD

PB7-J4B.SD

for example?

fine

do i have to change anything in mios itself - or is it done in the main app/mios.config file? (i know J5 and J10 are GPIO labeled on standard core docu - but J4 is for IIC)

Edited by Phatline

Share this post


Link to post
Share on other sites

In mios32_config file add :

#define MIOS32_DONT_USE_IIC

and the pin of J4 will not be initialized as I2C.

Then initialize the pin as Input e.g. PB6

  GPIO_InitTypeDef GPIO_InitStructure;
  GPIO_StructInit(&GPIO_InitStructure);
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
  GPIO_Init(GPIOB, &GPIO_InitStructure);

Finally to get value:

u8 value = (u8)MIOS32_SYS_STM_PINGET(GPIOB, GPIO_Pin_6);

Best
Bruno

 

1 person likes this

Share this post


Link to post
Share on other sites

did i connect the OLED-Display right?:

oled-dipcore-connect.thumb.png.4d3403d3e

i took this as blueprint: > it says CS0 to CS --- but on dipcore i see only CS1 --- doesnt matter?

stm-oled.thumb.png.eb150f1bd5368026ce986

Share this post


Link to post
Share on other sites

Yes of course it's fine, you can connect a second with J15.CS2, for more than two you will need to write your own driver to manage the multiple CS lines, with some 74HC595, this is what I did for the OLRE16.

Share this post


Link to post
Share on other sites

I will explain a bit more that part:

This J15 port is enough to connect multiple SPI oleds. Yes!

You can use CS1(RC), SDA(SO) and SCLK(SC) to connect some 595 registers in SPI, they will give you how much OLED CS lines you want...
SDA is the serial out and SCLK is your clock for your SPI chain and for the OLEDS. CS1 is your RC for the registers. DC is only connected to the Oleds. The thing is to connect all Output Enable pin(OE) of the registers to CS2(which is normally tied to ground on a DOUT module)
When you want to refresh the registers output(refresh your Oled CS lines) just put their output in High Impedance using OE(CS2) and the oleds will not receive any data cause they are not selected. Once the registers are refreshed, enable their outputs by putting CS2 high and send data or command to the OLEDS.

Share this post


Link to post
Share on other sites

Hi,

I received the dipBoard32 and the modules this morning. dipCoreF4 takes much time to fab because it's a 4 layers.

Some small mistakes on the silkscreen but everything else seems fine :)

Fichier%2004-10-2018%2012%2056%2020.jpeg
Fichier%2004-10-2018%2012%2056%2049.jpg?
Fichier%2004-10-2018%2012%2057%2015.jpg?

The BOMs for dipCoreF4 and dipBoardF4 are now available on their respective dokuwiki.
The BOMs for the Modules are coming soon!

Best regards
Bruno

1 person likes this

Share this post


Link to post
Share on other sites

Looking good! :)

Share this post


Link to post
Share on other sites
1 hour ago, Hawkeye said:

Looking good! :)

Thank you :)
I really like this moment, when thing becomes concrete, when I can touch it ;)

Share this post


Link to post
Share on other sites

Hello good Sunday,
Here it's raining a lot, I've got nothing to do outside...

Then I completed the BOMs:

BOM for dipCoreF4

BOM for dipBoardF4

BOM for USB module

BOM for External Power module

BOM for SD Card module

BOM for MCAN module

 

Note to the beta testers:

  • The 8MHz Quartz is not easy to find in this package(proprietary one), but I ordered some and I will put enough for you in the envelope.
  • Think about the IDC micromatch male connectors for your ribbons, I just listed the female sockets ;)

Best
Bruno


 

Share this post


Link to post
Share on other sites

Hooray for rain!

Looking good, the only thing I see in there which I don't recognise are these "micromatch" connectors. I guess any male 1.27 pitch connector with the right number of pins is suitable for making ribbon cables. I was thinking of using something like these, what do you think?

Share this post


Link to post
Share on other sites

Hi David,

On 08/10/2018 at 3:22 PM, monokinetic said:

something like these, what do you think?

!? The link you put is a micro-match too ;)

For explanation about Ports connectors and Micro-Match.
First you can use regular Shrouded Male header on top side of dipBoardF4. Except for J1A and J1B.
61201421621.jpg

There's 4 types of Micro-Match used here, all 2 row, 1.27mm pitch:

PBC = Paddle Board Connector:
product-details.pngThey are used on Top side of the dipBoardF4, regular Shrouded header replacement for lower profile. J4, J5, J8/9, J11, J15, J16E, J18, J19

FOB = Female On Board:
product-details.png
For connecting USB Module, J1A top side of dipBoard4.....Used on Bottom side of the dipBoard to stack another board, J1B, J4, J5, J8/9, J11, J15, J16E, J18, J19.....All modules connectors are this type too.
MOB = Male On Board:
product-details.png
Used on top side of the stacked board which is under the dipBoardF4, J1B, J4, J5, J8/9, J11, J15, J16E, J18, J19
MOW = Male on Wire:
product-details.png
Used on Modules side of wire, and on dipboardF4 side of wire for J1A too.


Note: External power module is connected to USB module directly with J2A and J2B.


They are not expensive and there's a cheaper 'value-line' in black.
product-details.png

This is the only way I found to get the dipBoardF4 the more Modulable as possible.

Feel free to ask more question ;)

Bruno


 

Edited by Antichambre

Share this post


Link to post
Share on other sites

Great thanks for confirming. Now I know all about Micro-match :) I've added some value versions and luxury versions to my Mouser order for testing.

Share this post


Link to post
Share on other sites

Hello

Very interesting compact design !

Is there a way to have 4 midi IO with this 64pin version ?

Best

Zam

Share this post


Link to post
Share on other sites
On 10/11/2018 at 0:18 PM, Zam said:

Is there a way to have 4 midi IO with this 64pin version ?

Yes, there's 6 USART/UART in an STM32F407 or STM32F405. It's just a question of alternate functions available for the pins. Check this xls chart
It must be validate in MIOS32 code and must be some defines to add, it's maybe a good idea, the dual I2C ports could become 2 extra MIDI IO on the dipCoreF4. If it's really necessary.
Even if I didn't think it for that cause I wanted to use the two existing MIDI IO for other purpose than MIDI like WIFI for example. And obviously use the m16 as main MIDI interface for 16 IO.

Best
Bruno

Edited by Antichambre
change F105 to F405!!!

Share this post


Link to post
Share on other sites

Ok, what i suppose is possible :)

Alternate mios32 to flip I2C to extra uart midi I/O is fine :happy:

I don't use optocoupler, but direct J11 connection (at 10x midi speed) in a design where 3 core (later 4) are linked together

Your design can potentially reduce a lot of space if I want to fit everything in a one U rack (now it's a 3U...)

Best

Zam

 

 

Share this post


Link to post
Share on other sites
32 minutes ago, Zam said:

I don't use optocoupler, but direct J11 connection (at 10x midi speed) in a design where 3 core (later 4) are linked together

Have a look on the MCAN if you want to put several cores on the same BUS and interconnect them.
it's between 15 and 25 times the regular midi speed and 16 virtual Ports.

Bruno

Share this post


Link to post
Share on other sites

You can use the MBNET interconnection diagram, if your cores are in the same enclosure you don't need transceiver but just one wire, with J18. The CAN interface will naturally transport MIDI, it's the MCAN
Let me know if you want to try it, I can provide you a beta version of the MIOS32 with this feature inside...

This is the list of the MIDI Ports available with the dipCoreF4, what I want, cause this is not tested yet.

/////////////////////////////////////////////////////////////////////////////
// Global Types
/////////////////////////////////////////////////////////////////////////////
//typedef enum {
  DEFAULT    = 0x00,
  MIDI_DEBUG = 0x01,

  USB0  = 0x10 ... USB7   = 0x17  	// 8 virtual ports max (1st OTG, is Device or Host)
  USB8  = 0x18 ... USB15   = 0x1f  	// 8 virtual ports max (2nd OTG, is Host only)

  UART0 = 0x20 ... UART1  = 0x21  	// 2 ports (J11)
  UART2 = 0x22 ... UART3  = 0x23	// 2 ports Option(J4 shared with IIC0 to IIC1)

  IIC0  = 0x30 ... IIC7   = 0x37	// 8 outputs ports (Outputs only, J4)

  OSC0  = 0x40 ... OSC7   = 0x47	// 8 virtual ports (e.g. Wifi on UART0)

  SPIM0 = 0x50 ... SPIM15 = 0x5f 	// 16 ports (m16 connected in SPI)

  MCAN0 = 0x60 ... MCAN15 = 0x6f 	// 16 virtuals ports (J18, CAN bus)

//} mios32_midi_port_t;

 

Edited by Antichambre

Share this post


Link to post
Share on other sites
47 minutes ago, Antichambre said:

You can use the MBNET interconnection diagram, if your cores are in the same enclosure you don't need tranceiver but just one wire, with J18. The CAN interface will naturally transport MIDI, it's the MCAN
Let me know if you want to try it, I can provide you a beta version of the MIOS32 with this feature inside...

That's promising... is this new work around mios32 or did I miss this time ago ?

I'm in standby right now with all this (my fader automation, which work great by the way...) and busy at the studio, but definitely interested...

I'll come back to you when I have time, and if I'm not able to build mios32 by myself with all info at your link !

Best

Zam

 

ps: how is the physical wiring around J18 for two or more cores ?

Share this post


Link to post
Share on other sites
On 10/11/2018 at 3:49 PM, Zam said:

how is the physical wiring around J18 for two or more cores ?

Have a look on J18 here: http://www.ucapps.de/mbhp/mbhp_core_stm32f4.pdf
Interconnection is like this for MBNet: http://www.ucapps.de/midibox_sid/mbsid_v2_communication.pdf

Last diagram is for PIC but it's the same.


fetch.php?media=antichambre:can_single_w

J18 is present on all Cores, Disco, wCore, you can already try it if use STM32F4 for your project, just 'one wire' ;)
... 2 wires(signal + ground).

Edited by Antichambre

Share this post


Link to post
Share on other sites

Thanks a lot... I don't know how I miss this... single wire TX/RX it's perfect (my 0v is already shared by all cores)

Did you already try the max length of the cable ?

Is there some disadvantage compared to uart midi (direct J11 connection) with 10x speed at mios32, or only advantage?

latency etc...

Ok I stop here MBNet it's not the purpose of this topic :rolleyes:

Best

Zam

Share this post


Link to post
Share on other sites
28 minutes ago, Zam said:

Is there some disadvantage compared to uart midi (direct J11 connection) with 10x speed at mios32, or only advantage?

latency etc...

First advantage, One core send a MIDI message all others receive it at the same time, there's no master, no slave ;) It's like a network.
All cores in the same box, you don't need transceiver and the 'one wire' bus for 4 cores will not exceed 40cm.
Extrnally, between 2 MIDIbox you will need transceivers(RJ11 MCAN Module). I tried 3 machines over 5m only, @2MBit/s with good ADSL cables it works without error. But speed can be reduced to win length and stability.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now