Jump to content

MIOS32 progress


OneLittleFonzie
 Share

Recommended Posts

Thanks for the quick reply

So, I've used the example "apps\tutorials\009_dout" should work. In my case it doesn. I've connected 1 led for now and nothing happens. When it starts up the led lits while booting as well as the activity led on the board.

I've added this piece in de APP_Init and the APP_MIDI_NotifyPackage event handler

u8 i;

for i = 0 ; i < 127 ; i++ )

{

MIOS32_DOUT_PinSet(i, 1);

}

Nothing happens when I press a button, also the activity led doesn't flip while MIOS32_BOARD_LED_Set(1, ~MIOS32_BOARD_LED_Get()); is in the handler body.

When I add:

if( midi_package.type == NoteOn && midi_package.chn == Chn1 && midi_package.velocity > 0 )

MIOS32_MIDI_SendCC(port, Chn1, 1, midi_package.velocity);

I receive something back from the MIOS32 in my midi monitor so that handler is activited.

What is happening (or not).

Thanks very much

Ron

Link to comment
Share on other sites

It sure is strange. It's exactly like on the diagram

I'm going to buy a LCD 4*20 this afternoon. This way I can check what the MIOS32_DOUT_PinSet method returns.

I can imagine that I did something wrong but I'm more surprised about the activity led on the board. It does exactly what is needs to do but it doesn't toggle when I receive incoming midi data. The handler works because I can return midi messages which I see in the midi monitor

strange, strange, strange

Thanks

Ron

Link to comment
Share on other sites

One possible reason (beside of bad solderings or wrong connections between MBHP_CORE_STM32 and MBHP_DOUTX4 module) is that the 220 Ohm Pull-up resistor array R31 is not mounted.

You can test this by measuring the voltage between ground and pin J8:SO, J8:SC, J8:RC when the DOUT module is *not* connected.

Note that due to the AC waveforms generated by the SPI transfers you won't measure exact DC values with a common multimeter, but they could give you some hints.

E.g., J8:SO should be 0V when your application sends 0 to all DOUT pins, and it should be ca. 5V when you application sends all-1

J8:SC should be between 4V..5V (each mS this pin sends a burst of 1 MHz for ca. 300 uS)

J8:RC should be ca. 5V (only short pulses sent each mS)

If you always read 0V, the pins are probably floating, accordingly the pull-ups are not connected.

Btw: the usage of MIOS32_MIDI_SendDebugMessage() is really recommented for debugging, it's more useful than a LCD.

See also http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F003_debug_messages%2F

Best Regards, Thorsten.

Link to comment
Share on other sites

Well, the jumpers were the problem. Now it seems uploading is suddenly a problem :-)

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Starting upload of project.hex

Requesting reboot...

Waiting for upload request...

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Received Upload Request

Received Checksum: 00 - OK

Received Checksum: 00 - OK

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received Checksum: 00 - Error

Sending block #1 08004000-080040FF

Received error code 01: Less bytes than expected have been received

Aborting after 16 errors

Link to comment
Share on other sites

But it worked before, correct?

I guess that you changed something on the MIOS Studio configuration which causes this effect, somehow it looks like a feedback loop, since messages are received multiple times.

It could also be, that a second application is running in background which forwards MIDI events (you are working under MacOS, right?)

-> check the MIDI routings.

Best Regards, Thorsten.

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