Jump to content

BEGINNER - Problems with INPUTS on MBHP CORE STM32F4


roberto
 Share

Recommended Posts

Christmas time is time to get some serious projects started!

 

 

Hi, my name is Roberto

 

this is one of my bigger DiY project and my first post here. first of all, this is a very cool platform, well documented and really expandable. what i was looking for!

 

I bought a MBHP CORE STM32F4 and some modules like DIO, DOUT, AINSER64, MIDI IO and AOUT_NG. My goal is to build a midi controller to interact with an attached computer and software via usb midi. later i want to extend it to work with midi and control voltage outputs for synths/modular application.

 

I have basic knowledge in electronics, decent soldering and some beginner programming skills. so more or less I’m a NOOB.

 

I soldered all the boards except MIDI IO and AOUT_NG and made some tests and detected that i have PROBLEMS WITH THE INPUTS. Although i am able to send midi notes to the DOUT and light LED’s, I’m not able to get any inputs from the DIN (with buttons) nor AINSER64 (with faders).

 

So, i’m stuck here right now and have some questions about it:

 

The SD-Card Holder (and the SD Card) is missing on the MBHP Core, because i still wait for it to be delivered. Is it crucial to have it soldered? And, i didn’t planed to attach a LCD. Is it needed to make the whole thing work?

 

here is what i did until now:

 

 

The button is attached to J3 (VS - D0) of a DIN module. I can’t see any incoming messages in MIOS Studio… Can i measure the functionality with a multimeter?

All i see is a drop from 4.8v to 0v at pin 11 of IC1. But i guess it’s not possible to use a multimeter to measure the serial output…

 

The same with AINSER64, Pot attached to VS - VD on the sides and A0 on the middle, no messages on the MIOS Studio terminal…

The green LINK LED stays lit on the AINSER64, so i guess some communication is missed somewhere.

 

I searched for solutions all over the site and i didn’t find any satisfying answer. did i miss something?

 

 

all the best and cherry friskmas

 

roberto

 

 

Link to comment
Share on other sites

I'm not sure how MIDIO128 works in the default config. With _NG the SD card defines the hardware definitions, but the DINs should still register even without any (I think the shift register scan is implemented by default).

You can try

set debug on

in MIOS Studio, this should give you feedback on any data sent or received by the Core.

 

Link to comment
Share on other sites

Ok, MBNG loaded, set debug on

is showing values when i send midi to the DOUT

[5328.903] set debug on
[5328.905] Debug mode turned on
[5333.689] MBNG_DIN_NotifyReceivedValue(1, 107)
[5333.689] MBNG_DOUT_NotifyReceivedValue(1, 107)
[5333.921] MBNG_DIN_NotifyReceivedValue(1, 0)
[5333.921] MBNG_DOUT_NotifyReceivedValue(1, 0)

still no luck on getting values when a button is pressed at DIN...

 

 

 

Link to comment
Share on other sites

tried with 3 different DIN - all the same.

i connected the DIN without a ribbon cable. after connecting (with single wires) RC2, SC and SI on J9 of the core to the same pins on DIN, and by pullig SI in and out i get random messages in MIOS:

 

[19138.934] MBNG_DIN_NotifyToggle(102, 0)
[19138.934] No event assigned to BUTTON hw_id=102
[19138.943] MBNG_DIN_NotifyToggle(102, 1)
[19138.943] No event assigned to BUTTON hw_id=102
[19141.001] MBNG_DIN_NotifyToggle(143, 1)
[19141.001] No event assigned to BUTTON hw_id=143
[19141.001] MBNG_DIN_NotifyToggle(157, 1)
[19141.001] No event assigned to BUTTON hw_id=157
[19141.548] MBNG_DIN_NotifyToggle(177, 1)
[19141.548] No event assigned to BUTTON hw_id=177
[19142.082] MBNG_DIN_NotifyToggle(6, 0)
[19142.082] [EVENT] id=BUTTON:6 hw_id=BUTTON:6 bank=0 fwd_id=LED:6 type=NoteOn value=0 label=^std_btn
[19142.082] MBNG_DOUT_NotifyReceivedValue(6, 127)
[19142.082] MBNG_DIN_NotifyToggle(31, 1)
[19142.082] [EVENT] id=BUTTON:31 hw_id=BUTTON:31 bank=0 fwd_id=LED:31 type=NoteOn value=0 label=^std_btn
[19142.082] MBNG_DOUT_NotifyReceivedValue(31, 0)
[19142.091] MBNG_DIN_NotifyToggle(6, 1)
[19142.091] [EVENT] id=BUTTON:6 hw_id=BUTTON:6 bank=0 fwd_id=LED:6 type=NoteOn value=127 label=^std_btn
[19142.092] MBNG_DOUT_NotifyReceivedValue(6, 0)

 

switch should be standard, swapping the pins didn't help...

metal16mmbuttons.jpg

Link to comment
Share on other sites

Testing inputs without DIN doesn't make sense IMO. You could add the SCS interface, but it doesn't help with your switch problem. 

The random events are the SI transitioning HiZ-high (pull-up resistor attached). It will depend on where the clock pulse is as to the address. 

Forget the switch and jumper one of the DINs (pins 3-10 to 0V. You should get the correct event.

Are you sure you have the pins of the switch correct? Best would be between NO1 (DIN) and C1 (0V). Between NC1 and NO1 will not show a difference. Between NC1 and C1 should give an event with inverted behaviour.  Or is your switch different to that pictured (are individual RGB pins available?)

Link to comment
Share on other sites

the switch pins are connected as you wrote: C1=0V NO1 to DIN

the scematic above is indeed an other button, a single color. i test the button behaviour with this one for the moment. The other RGB LED/switch looks like this this:

But anyway  it's not working either with the RGB button switch...

i think the problem has to be somewhere else...

 

RGB BUTTON.png

Link to comment
Share on other sites

sorry man, thank you million for your help but you are going into the wrong direction. lets forget the rgb button! i managed to get the leds work, i'm aware about the common anode...

lets keep it simple. if I'm doing a short between Vs and D0-D7 of J3 on the DIN then i should get a message in the MIOS right? it's not happening...

 

Link to comment
Share on other sites

I am not sure it will work without having a configuration file loading. Maybe you can set DIN  up strictly from the console but I have not tried. You can activate DOUT for sure from the console with: "set DOUT 0 1" be careful how many leds you turn on with this command or you can drwls a lot of power.

You can build one of these easily:

http://www.ucapps.de/mbhp_sdcard.html

This SD reader would be good for testing as well. This would allow you to write and test a configuration file. You can access the config files from mios studio to edit it. that way you do not have to take the card out.

 

If you have the default NG configuration loading you should see button presses in the console. If you are getting a lot of noise and errant button presses showing up I would check for shorts somewhere and a swapped connector on your cables or on your boards. . Remember your dout and DIN are on separate channels on the sirio so it is very possible for one to work but not the other if there is an error or bad component somewhere on the other part of the chain. Mainly SI vs SO. If there is a wiring error, sorted trace, or component error that could account for your issues.

Link to comment
Share on other sites

thank you Gerald, i think i'll wait until the card reader is here. I'm away the next few days so it's worth waiting.

i dort see any button presses with the default NG configuration. but i can send messages from MIOS to DOUT.

i will recheck the DIO boards again, but im shure they are ok, because all 3 of them do the same error...

cheers

Link to comment
Share on other sites

It may or may not be the boards. You may have an issue with your core or the jumper that goes from the core to the dio. I have even had a faulty STM with a shorted pin on the cpu. The boards also have an in and out sides for the header coming from the core to be aware of. I would check the entire path for faults all the way back to the cpu. It is easy but tedious you just need to look at the schematic.

http://www.ucapps.de/mbhp/mbhp_core_stm32f4.pdf

This post might be helpful it has the pinout of the cpu if you want to trace all the way back to the pins on the cpu.

http://midibox.org/forums/topic/20396-stm32f4-sdcard-reading-cid-failed-with-status-256-solved/

I would not attempt a repair as in the above post if you picked up your board form a good supplier if you find a similar fault but return it. I had bought this one on Amazon and the seller would not return it as I had had it for quite a while before I found the fault. That said it is way more likely that the issue is either a bad cable or a bad solder joint but I would check everything. Sometimes you get lucky and everything just works the first time and other times you have to put in the trouble shooting time to find the bug. It is helpful to remember a lot of other folks have this working and that it works. It can be a bit easier once you have some working parts as you have known good parts to test against. That is all part the learning curve of getting started. I would be really suspicious of the SI path and would check that for shorts, continuity and proper wiring along that path. I would test the cables and make sure they are pinned out the way you think they are as well. It is easy to reverse a connector or pin header on a din board.

 

Edited by gerald.wert
added links
Link to comment
Share on other sites

  • 3 weeks later...

ok, card reader finally arrived... it's recognized it seems:

[3381.877] sdcard

[3381.879] SD Card Informations

[3381.879] ====================

[3381.879] --------------------

[3381.879] CID:

[3381.879] - ManufacturerID:

[3381.879] - OEM AppliID:

[3381.879] - ProdName:    

[3381.879] - ProdRev: 133

[3381.879] - ProdSN: 0x00000707

[3381.879] - Reserved1: 193

[3381.880] - ManufactDate: 135

[3381.880] - msd_CRC: 0x29

[3381.880] - Reserved2: 1

[3381.880] --------------------

[3381.880] --------------------

[3381.880] - CSDStruct: 0

[3381.880] - SysSpecVersion: 0

[3381.880] - Reserved1: 0

[3381.880] - TAAC: 62

[3381.880] - NSAC: 0

[3381.880] - MaxBusClkFrec: 50

[3381.880] - CardComdClasses: 1461

[3381.880] - RdBlockLen: 10

[3381.880] - PartBlockRead: 1

[3381.880] - WrBlockMisalign: 0

[3381.880] - RdBlockMisalign: 0

[3381.880] - DSRImpl: 0

[3381.880] - Reserved2: 0

[3381.880] - DeviceSize: 3779

[3381.880] - MaxRdCurrentVDDMin: 4

[3381.881] - MaxRdCurrentVDDMax: 5

[3381.881] - MaxWrCurrentVDDMin: 4

[3381.881] - MaxWrCurrentVDDMax: 5

[3381.881] - DeviceSizeMul: 7

[3381.881] - EraseGrSize: 31

[3381.881] - EraseGrMul: 31

[3381.881] - WrProtectGrSize: 31

[3381.881] - WrProtectGrEnable: 0

[3381.881] - ManDeflECC: 0

[3381.881] - WrSpeedFact: 4

[3381.881] - MaxWrBlockLen: 10

[3381.881] - WriteBlockPaPartial: 0

[3381.881] - Reserved3: 0

[3381.881] - ContentProtectAppli: 0

[3381.881] - FileFormatGrouop: 0

[3381.881] - CopyFlag: 0

[3381.881] - PermWrProtect: 0

[3381.881] - TempWrProtect: 0

[3381.881] - FileFormat: 0

[3381.881] - ECC: 0

[3381.881] - msd_CRC: 0x7c

[3381.882] - Reserved4: 1

[3381.882] --------------------

[3381.882] 

[3381.882] Reading Root Directory

[3382.057] ======================

[3382.057] Retrieving SD Card informations - please wait!

[3382.058] SD Card: '': 990 of 990 MB free

[3382.058] [......a] 00/00/-20  00:00:00 AM     43432 DEFAULT.NGC

[3382.058] [......a] 00/00/-20  00:00:00 AM     584 DEFAULT.NGL

[3382.058] [......a] 00/00/-20  00:00:00 AM     251 DEFAULT.BIN

[3382.058] [......a] 00/00/-20  00:00:00 AM     520 DEFAULT.NGS

[3382.058] [......a] 00/00/-20  00:00:00 AM     3124 DEFAULT.NGK

[3382.058] [......a] 00/00/-20  00:00:00 AM     43432 TEST.NGC

[3382.059] [......a] 00/00/-20  00:00:00 AM     3124 TEST.NGK

[3382.059] done.

i can save and load from card.

i resoldered all boards again (DIN's, CORE), checked for shorts again and changed the IC's on the CORE (74HCT541 + 74HC595)

still no luck...

the DOUT's are working perfectly, the DIN's don't.

all i get is the attached debug infos when i short VS and D7 on the first Header J3 on the DIN. it sends 64 note-on's on close and 64 note-off's at open.

i get this on all DIN boards but ONLY on the first header (J3). all other headers (J4-J6) and pins (D0-D7) don't react... 

 

debug.rtf

Link to comment
Share on other sites

As the DOUT can be correctly addressed. this means the SC and RC lines are okay. I assume that RC1 and RC2 are connected together on the PCB? 

This gives me the impression that the problem is the SI pin (pin 5 on J8/9). With the ribbon cable connected to the DIN, is there continuity between this pin and PB14 on the Core? Is this pin shorted to anything else, such as SC, RC1/2, +5V, 0V?  Are any of pins 9 and 10 on the 74HC165s shorted? From pin 10 IC1 onwards, the signal should see a 10k pullup resistor. 

Link to comment
Share on other sites

damned, i measure and measure, check and check, over and over, i can't find it. so thank you latigid for the advice...

RC1 and 2 are NOT conected together. there's continuity from SI to pin PB14, no shorts anywhere to SC, RC, +5V, 0V, pins 9 and 10 are like expected and also 10k pullups are there...

but yes, the crank has to be there somwhere. i measure 4.9V on the DIN, i think this is ok? im sure it is something really dumb.

maybe something with the configuration? because i get some invalid infos like: ((don't know what tokens and .NGR and .NGC are for))

[8346.901] show ngr_tokens
[8346.903] Token processing is: enabled
[8346.903] Token memory allocation: 0 of 16384 bytes
[8346.903] .NGR file is: invalid
[8346.903] Tokens are: invalid

attached is the whole config file and at the end the midi routings and the reset info. there is no source port set ON. is this intended like that? or do i have to change that?

Snapshot #0 not stored in /DEFAULT.NGS yet.. how to store ???

config.rtf

Edited by roberto
Link to comment
Share on other sites

The DIN should show +5V as there's a 10k pullup attached. You could try connecting RC1 instead of RC2, as they pulse at the same time anyway.

The incremental behaviour is weird, it's like the data is being latched on every clock. You're sure you've got RC and SC correct? No shorts, including any of pins  PB15, PB13, PB12, PD10 on the Discovery board?

Link to comment
Share on other sites

RC 1 instead of 2 - no change of behaviour... and still no shorts at any of your mentioned pins... grrmpf

RC and SC are correct, tried it with different ribbons and straight jumpers...

just to mention, IC 1 on the CORE is a 74 HCT 540 instead a 541... ordered a 541 - they sent me a 540. looking at the specs, it doesn't matter. right?

i'm getting fuzzy :-(

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...
 Share

×
×
  • Create New...