Sony's Developer World forum

    • Home
    • Forum guidelines

    Auto running code on reset

    Spresense
    2
    5
    693
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aswinsreekumar last edited by aswinsreekumar

      Sir,
      Currently, the program runs when the particular function is called in the terminal. Is there a method to run main() automatically when its reset each time ? (SDK programming)

      Thank you

      K 1 Reply Last reply Reply Quote
      • K
        KamilTomaszewski DeveloperWorld @aswinsreekumar last edited by

        Hi @aswinsreekumar

        It is described here: https://developer.sony.com/develop/spresense/docs/sdk_developer_guide_en.html#_board_initialization_process

        1. Change the user entry point using CONFIG_USER_ENTRYPOINT configuration to your function.
        2. Add to the beginning of your main function:
        boardctl(BOARDIOC_INIT, 0);
        

        If you want to use SD card then check out a similar post here: https://forum.developer.sony.com/topic/111/how-to-set-player_main-as-the-sdk-application-entry-point

        Best Regards,
        Kamil Tomaszewski

        A 1 Reply Last reply Reply Quote
        • A
          aswinsreekumar @KamilTomaszewski last edited by

          @kamiltomaszewski Sir, how to implement step 1? Should I change CONFIG_USER_ENTRYPOINT="spresense_main" in sdk.config file of my project to CONFIG_USER_ENTRYPOINT="serial_on_off_main" ? (Given my application name is serial_on_off.c).

          Also another small doubt, how to power the extension board externally ? Because I'm unable to get the internal wiring diagram of the extension board and is there a pin connected to the input of LDO inside ?

          Thanking you.

          K 1 Reply Last reply Reply Quote
          • K
            KamilTomaszewski DeveloperWorld @aswinsreekumar last edited by

            Hi @aswinsreekumar

            To reconfigure, go to the SDK configuration as shown here: https://developer.sony.com/develop/spresense/docs/sdk_set_up_ide_en.html#_sdk_configuration. Then search for CONFIG_USER_ENTRYPOINT and change to serial_on_off_main. Click Save to save.

            You can find all diagrams here: https://developer.sony.com/develop/spresense/docs/hw_design_en.html

            Additionally, if you are interested in power supply, please see this:
            https://developer.sony.com/develop/spresense/docs/hw_docs_en.html#_regarding_power_supply_when_connecting_externally_connected_devices_to_the_spresense_board

            I think that should answer your questions. If not, let me know.

            Best Regards,
            Kamil Tomaszewski

            A 1 Reply Last reply Reply Quote
            • A
              aswinsreekumar @KamilTomaszewski last edited by

              @kamiltomaszewski Thank you sir. User entry point configuration was successful and I understood regarding the external powering up from the diagram.

              1 Reply Last reply Reply Quote
              • First post
                Last post
              Developer World
              Copyright © 2021 Sony Group Corporation. All rights reserved.
              • Contact us
              • Legal