Jump to content

stopped booting from usb


sprintf

Recommended Posts

I suddenly have a Hard Fault 0x00018fc2 when powercycling and booting NG via USB Power / USB Data Connection.

If the bootloader jumper is connected i can use the USB Connection to upload the bootloader . but after uploading NG  again and rebooting , it wont boot back up after power cycling the USB Connection.

The App will boot properly with external power and detached USB cabel.

 

this suddenly occured

i use a self powered usb hub .

i tried disconnecting all attachments ( sdcard , scs ,etc .. ) but that does not change the behaviour.

I also recompiled the hex and tried again , but no luck.

does someone have a guess ?

Edited by sprintf
Link to comment
Share on other sites

  • sprintf changed the title to stopped booting from usb

hmm, i would first jumper all J5A/B/C - if they are open... so you have no noise from the ADCs... I know USB has nothing to do with ADCs, but that i would do first (  because that happend often when it not booted up)

A virgin  NG1.037? or somekind modified? (like the font thingi?)

post what you have in "mios32_config.h"

 

else i dont know, mostly i get  hardfault when writing negtativ values intos unsigned integer variables (aka use s16 instead of u16 variables), or doing mess with custom freertos tasks.... i am really no expert for NG... you could post the code here (zip) and i can try if it does the same, have a stm or lpc here to test..

Edited by Phatline
Link to comment
Share on other sites

ok, cant say what the display says (since it there is no) but the board led is blinking rapid. and mios studio does not recognize the board.

 

i tested it on the LPC-Core, plugged into my laptop

when i plug the usb-cable to a wall-5V adapter, its not  blinking.

 

so yes - this is a software thing, not a hardware.

 

about mios-config... there is a lot activated.... do you use all the things in there? (#define MIOS32_SRIO_NUM_SR 32    and so on...)

Edited by Phatline
Link to comment
Share on other sites

2 hours ago, Phatline said:

ok, cant say what the display says (since it there is no) but the board led is blinking rapid. and mios studio does not recognize the board.

 

i tested it on the LPC-Core, plugged into my laptop

when i plug the usb-cable to a wall-5V adapter, its not  blinking.

 

so yes - this is a software thing, not a hardware.

 

about mios-config... there is a lot activated.... do you use all the things in there? (#define MIOS32_SRIO_NUM_SR 32    and so on...)

so this means , its better to edit the mios-config , before i compile ,right ?

Link to comment
Share on other sites

i jumpered J27 in order to come into bootload-mode... (in order to upload new code...)

then downloadet the actual bootloader, and made sure that i used the correct LPC1769 since mine is a 1769

then dowloaded the actual github zip from https://github.com/midibox/mios32

set the environment variables to lpc... restardet

built the NG-code from the downloadet github.... ("make clean", then "make")

uploadet the build project.hex

removed the J27 jumper (then mios made a softreset

mios writes:
 

no response from CLCD.... (off course nothing connected)

Init DHCP

PHY initialized

SD Card not found

no problem up to this point

 

but after reconnecting the USB-Cable (aka hard-reset) it goes into HARDFAULT ---aka blinking rapid

 

so it is confirmed the actual NG-Firmware was not tested for a LPC-Core (maybe someone made changes, but tested it only on STM32?

 

 

Link to comment
Share on other sites

this is writing while building (for those who looking into this tread, and having a glue...)

Quote

autark@Projekt:~/midibox/mios32/apps/controllers/midibox_ng_v1$ make clean
rm -rf project_build
autark@Projekt:~/midibox/mios32/apps/controllers/midibox_ng_v1$ make
rm -f project.hex
Creating object file for app.c
Creating object file for mbng_sysex.c
Creating object file for mbng_patch.c
Creating object file for mbng_event.c
Creating object file for mbng_din.c
Creating object file for mbng_dout.c
Creating object file for mbng_dio.c
Creating object file for mbng_rgbled.c
Creating object file for mbng_enc.c
Creating object file for mbng_ain.c
Creating object file for mbng_ainser.c
Creating object file for mbng_kb.c
Creating object file for mbng_matrix.c
Creating object file for mbng_cv.c
Creating object file for mbng_mf.c
Creating object file for mbng_lcd.c
Creating object file for mbng_seq.c
Creating object file for mbng_file.c
Creating object file for mbng_file_c.c
Creating object file for mbng_file_l.c
Creating object file for mbng_file_s.c
Creating object file for mbng_file_r.c
src/mbng_file_r.c: In function 'setTokenizedValue':
src/mbng_file_r.c:1902:8: warning: unused variable 'is_range' [-Wunused-variable]
Creating object file for mbng_file_k.c
Creating object file for terminal.c
src/terminal.c: In function 'TERMINAL_ParseLine':
src/terminal.c:494:11: warning: implicit declaration of function 'MBNG_FILE_K_Write' [-Wimplicit-function-declaration]
Creating object file for scs_config.c
Creating object file for main.c
Creating object file for strtol.c
Creating object file for tasks.c
Creating object file for list.c
Creating object file for queue.c
Creating object file for timers.c
Creating object file for port.c
/home/autark/midibox/mios32/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c: In function 'prvPortStartFirstTask':
/home/autark/midibox/mios32/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c:282:1: warning: stack usage computation not supported for this target [enabled by default]
Creating object file for heap_4.c
Creating object file for startup_LPC17xx.c
Creating object file for mios32_srio.c
Creating object file for mios32_din.c
Creating object file for mios32_dout.c
Creating object file for mios32_enc.c
Creating object file for mios32_lcd.c
Creating object file for mios32_midi.c
Creating object file for mios32_osc.c
Creating object file for mios32_com.c
Creating object file for mios32_uart_midi.c
Creating object file for mios32_spi_midi.c
Creating object file for mios32_iic_midi.c
Creating object file for mios32_iic_bs.c
Creating object file for mios32_mf.c
Creating object file for mios32_sdcard.c
Creating object file for mios32_enc28j60.c
Creating object file for mios32_timestamp.c
Creating object file for mios32_bsl.c
Creating object file for mios32_sys.c
Creating object file for mios32_irq.c
Creating object file for mios32_spi.c
Creating object file for mios32_i2s.c
Creating object file for mios32_board.c
Creating object file for mios32_timer.c
Creating object file for mios32_stopwatch.c
Creating object file for mios32_delay.c
Creating object file for mios32_ain.c
Creating object file for mios32_usb.c
Creating object file for mios32_usb_midi.c
Creating object file for mios32_usb_com.c
Creating object file for mios32_uart.c
Creating object file for mios32_iic.c
Creating object file for printf-stdarg.c
Creating object file for core_cm3.c
/home/autark/midibox/mios32/drivers/LPC17xx/CMSIS/src/core_cm3.c: In function '__get_PSP':
/home/autark/midibox/mios32/drivers/LPC17xx/CMSIS/src/core_cm3.c:451:1: warning: stack usage computation not supported for this target [enabled by default]
Creating object file for usbhw_lpc.c
Creating object file for usbcontrol.c
/home/autark/midibox/mios32/drivers/LPC17xx/usbstack/src/usbcontrol.c: In function 'StallControlPipe':
/home/autark/midibox/mios32/drivers/LPC17xx/usbstack/src/usbcontrol.c:127:6: warning: variable 'pb' set but not used [-Wunused-but-set-variable]
Creating object file for usbstdreq.c
Creating object file for usbinit.c
Creating object file for app_lcd.c
Creating object file for glcd_font_normal.c
Creating object file for glcd_font_normal_inv.c
Creating object file for glcd_font_big.c
Creating object file for glcd_font_small.c
Creating object file for glcd_font_tiny.c
Creating object file for glcd_font_knob_icons.c
Creating object file for glcd_font_meter_icons_h.c
Creating object file for glcd_font_meter_icons_v.c
Creating object file for midi_router.c
Creating object file for midi_port.c
Creating object file for midimon.c
Creating object file for uip.c
Creating object file for uip_arp.c
Creating object file for uiplib.c
Creating object file for psock.c
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function 'psock_send':
/home/autark/midibox/mios32/modules/uip/uip/psock.c:179:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable]
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function 'psock_generator_send':
/home/autark/midibox/mios32/modules/uip/uip/psock.c:218:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable]
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function 'psock_readto':
/home/autark/midibox/mios32/modules/uip/uip/psock.c:274:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable]
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function 'psock_readbuf':
/home/autark/midibox/mios32/modules/uip/uip/psock.c:301:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable]
Creating object file for timer.c
Creating object file for uip-neighbor.c
Creating object file for memb.c
Creating object file for clock-arch.c
Creating object file for network-device.c
Creating object file for lpc17xx_emac.c
Creating object file for uip_task.c
Creating object file for dhcpc.c
Creating object file for osc_server.c
Creating object file for osc_client.c
Creating object file for uip_terminal.c
Creating object file for freertos_utils.c
Creating object file for keyboard.c
Creating object file for ainser.c
Creating object file for aout.c
Creating object file for max72xx.c
Creating object file for ws2812.c
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:75:2: warning: #warning "WS2812 driver not supported for this derivative yet!" [-Wcpp]
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:111:12: warning: 'ws2812_send_double_buffer' defined but not used [-Wunused-variable]
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:119:12: warning: 'ws2812_state_ctr' defined but not used [-Wunused-variable]
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:122:11: warning: 'ws2812_rgb_values' defined but not used [-Wunused-variable]
Creating object file for notestack.c
Creating object file for diskio.c
Creating object file for ccsbcs.c
Creating object file for ff.c
Creating object file for file.c
Creating object file for md5.c
Creating object file for seq_bpm.c
Creating object file for seq_midi_out.c
Creating object file for msd.c
Creating object file for msc_bot.c
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_bot.c: In function 'MSCBotBulkOut':
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_bot.c:268:13: warning: variable 'iChunk' set but not used [-Wunused-but-set-variable]
Creating object file for msc_scsi.c
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_scsi.c: In function 'SCSIHandleCmd':
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_scsi.c:155:14: warning: variable 'dwLBA' set but not used [-Wunused-but-set-variable]
Creating object file for blockdev_sd.c
Creating object file for scs.c
Creating object file for scs_lcd.c
Creating object file for mini_cpp.cpp
Creating object file for freertos_heap.cpp
-------------------------------------------------------------------------------
Application successfully built for:
Processor: LPC1769
Family:    LPC17xx
Board:     MBHP_CORE_LPC17
LCD:       universal
-------------------------------------------------------------------------------
arm-none-eabi-size project_build/project.elf
   text       data        bss        dec        hex    filename
 269514        152      64256     333922      51862    project_build/project.elf
10000000 B __ram_start
10007fd8 B __ram_end
2007c000 D __ram_start_ahb
20083bc0 B __ram_end_ahb

 

 

Edited by Phatline
Link to comment
Share on other sites

hmmm has to do with UART

because when i add follwing line to mios_config.h

#define MIOS32_DONT_USE_UART

the board is working normal,

i dont know what UART in this sense does? (USB-midibports??? Din-Midiports?) i dont know

this is all i can do, the rest has to be done who knows this application

Link to comment
Share on other sites

Thank you for all your effort .

I was really getting frustrated .

_

this is really sad news , since i was actually working with this release . now i cant compile any more.

 

UART here , has either something to do with Ethernet / RS-232 Interface or a Serial Connection ?

i will check if i can use the release properly without UART .

Link to comment
Share on other sites

hello again .

i also have hard faults with 1.036 now .

but only every 2nd or third time i reconnect the usb cabel .

im wondering if maybe something got seriously damaged .

how warm will the lpc get usually ?

the mcu is getting warm . i can still touch it but im wondering why it is warm at all with such small duties .

this is the normal official release from the download page .

is there a way to identify the hard fault adress ?

Link to comment
Share on other sites

  • 3 weeks later...

Thank you ,

im measuring something similar .

so this seems normal .

 

i can replicate the behaviour now and i hope this will help to track down my problem .

 

when i connect my core with NG 1.036 to a external psu ( no usb data connection ) the app / core  is always starting properly .

when i connect the core to usb ( as long as there is no data handshake with mios , ableton or any software ) it will boot fine .

when the core is connected to usb (power) and i start mios or any other app on the mac (e.g. ableton , logic etc ) the core is crashing.

the hard fault adress is always 0x000189ce .

i can workaround this crash if i boot with "Bootloader HOLD Mode jumper" and remove the jumper afterwards.

how can i find out about the hard fault adress ?

 

ps . you are right about "disable UART.." from config file .

this is preventing the hard fault (as well) .

but then i loose the midi in / out ( 5 pole DIN )    :(

 

actually after reactivating UART and reducing encoders ( from 125 to 33 ) as well as reducing aout channels (from 32 to 8) , the hard fault seems to have vanished.

i still would like to know how to find and identify the hard fault adress

 

Edited by sprintf
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...