Skip to content

Commit

Permalink
Merge pull request #1 from ddka22/topic/mtb3.0-migration
Browse files Browse the repository at this point in the history
Update source files for MTB 3.0 release
  • Loading branch information
ddka22 authored Oct 28, 2022
2 parents 92c863d + ed594dc commit 81a76b1
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 44 deletions.
25 changes: 10 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,29 @@
#
################################################################################
# \copyright
# Copyright 2018-2021, Cypress Semiconductor Corporation (an Infineon company)
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# $ Copyright 2018-2022 Cypress Semiconductor Apache2 $
################################################################################


################################################################################
# Basic Configuration
################################################################################

#Type of MTB Makefile Options include:
#
#COMBINED -- Top Level Makefile usually for single standalone application
#APPLICATION -- Top Level Common Makefile usually for multi-project in application
#PROJECT -- Project Makefile for each project under Application
#
MTB_TYPE=COMBINED

# Target board/hardware (BSP).
# To change the target, it is recommended to use the Library manager
# ('make modlibs' from command line), which will also update Eclipse IDE launch
# configurations. If TARGET is manually edited, ensure TARGET_<BSP>.mtb with a
# valid URL exists in the application, run 'make getlibs' to fetch BSP contents
# and update or regenerate launch configurations for your IDE.
TARGET=CY8CKIT-062S2-43012
TARGET=APP_CY8CKIT-062S2-43012

# Name of application (used to derive name of final linked file).
#
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ This package contains a template project for the CY8CKIT-062S2-43012 and the CY8

## Requirements

- [ModusToolbox&trade; software](https://www.cypress.com/products/modustoolbox-software-environment) v2.2 or later (tested with v2.4)
- Board support package (BSP) minimum required version: 2.0.0
- [ModusToolbox&trade; software](https://www.infineon.com/cms/en/design-support/tools/sdk/modustoolbox-software/) v3.0 or later (tested with v3.0)
- PSoC&trade; 6 Board support package (BSP) minimum required version: 4.0.0
- Programming language: C
- Associated parts: All [PSoC&trade; 6 MCU](https://www.cypress.com/PSoC6) parts
- Associated parts: All [PSoC&trade; 6 MCU](https://www.infineon.com/cms/en/product/microcontroller/32-bit-psoc-arm-cortex-microcontroller/psoc-6-32-bit-arm-cortex-m4-mcu)

## Supported toolchains (make variable 'TOOLCHAIN')

- GNU Arm&reg; embedded compiler v9.3.1 (`GCC_ARM`) - Default value of `TOOLCHAIN`
- GNU Arm&reg; embedded compiler v10.3.1 (`GCC_ARM`) - Default value of `TOOLCHAIN`
- Arm&reg; compiler v6.13 (`ARM`)
- IAR C/C++ compiler v8.42.2 (`IAR`)

## Supported kits (make variable 'TARGET')

- [PSoC&trade; 62S2 Wi-Fi Bluetooth&reg; pioneer kit](https://www.cypress.com/CY8CKIT-062S2-43012) (`CY8CKIT-062S2-43012`)
- [PSoC&trade; 62S2 Wi-Fi Bluetooth&reg; pioneer kit](https://www.infineon.com/cms/en/product/evaluation-boards/cy8ckit-062s2-43012/) (`CY8CKIT-062S2-43012`)

## Installation

For this demo, you need to:
1. Download and install [ModusToolBox](https://www.cypress.com/products/modustoolbox).
2. Sign up and download the SensiML toolkit by following the [Getting Started](https://sensiml.com/documentation/guides/getting-started/overview.html#welcome-to-the-sensiml-toolkit) instructions .
1. Download and install [ModusToolBox](https://www.infineon.com/cms/en/design-support/tools/sdk/modustoolbox-software/).
2. Sign up and download the SensiML toolkit by following the [Getting Started](https://sensiml.com/documentation/guides/getting-started/overview.html#welcome-to-the-sensiml-toolkit) instructions.

## Usage

Expand Down Expand Up @@ -95,15 +95,17 @@ Various CLI tools include a `-h` option that prints help information to the term

1. Connect the board to your PC using the provided USB cable through the USB connector.

2. In source/app_config.h, ensure the mode is in DATA_CAPTURE_RUNNING_MODE to start capturing training data
2. Open a terminal program and select the KitProg3 COM port. Set the serial port parameters to 8N1 and 1000000 baud

3. In *source/app_config.h*, ensure the mode is in DATA_CAPTURE_RUNNING_MODE to start capturing training data

```
#define APPLICATION_RUNNING_MODE DATA_CAPTURE_RUNNING_MODE
```

**Optional**: The default sensor being used in the Microphone, if you want to capture motion data instead change the SENSOR_SELECT_MODE to SENSOR_MOTION.

3. Program the board using one of the following:
4. Program the board using one of the following:

<details><summary><b>Using Eclipse IDE for ModusToolbox</b></summary>

Expand All @@ -125,9 +127,9 @@ Various CLI tools include a `-h` option that prints help information to the term
```
</details>

4. Open SensiML Data Capture Lab from your Desktop and sign-in with your credentials if needed
5. Follow the steps outlined [here](https://sensiml.com/documentation/guides/getting-started/capturing-sensor-data.html) to start capturing data.
6. To label the data you have captured, follow the steps [here](https://sensiml.com/documentation/guides/getting-started/labeling-your-data.html).
5. Open SensiML Data Capture Lab from your Desktop and sign-in with your credentials if needed
6. Follow the steps outlined [here](https://sensiml.com/documentation/guides/getting-started/capturing-sensor-data.html) to start capturing data.
7. To label the data you have captured, follow the steps [here](https://sensiml.com/documentation/guides/getting-started/labeling-your-data.html).

### Training a Model using SensiML

Expand Down
1 change: 0 additions & 1 deletion deps/TARGET_CY8CKIT-062S2-43012.mtb

This file was deleted.

2 changes: 1 addition & 1 deletion deps/freertos.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/freertos#release-v10.4.3#$$ASSET_REPO$$/freertos/release-v10.4.3
mtb://freertos#latest-v10.X#$$ASSET_REPO$$/freertos/latest-v10.X
2 changes: 1 addition & 1 deletion deps/retarget-io.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/retarget-io#release-v1.3.0#$$ASSET_REPO$$/retarget-io/release-v1.3.0
mtb://retarget-io#latest-v1.X#$$ASSET_REPO$$/retarget-io/latest-v1.X
2 changes: 1 addition & 1 deletion deps/rgb-led.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/rgb-led#release-v1.2.1#$$ASSET_REPO$$/rgb-led/release-v1.2.1
mtb://rgb-led#latest-v1.X#$$ASSET_REPO$$/rgb-led/latest-v1.X
2 changes: 1 addition & 1 deletion deps/sensor-motion-bmi160.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/cypresssemiconductorco/sensor-motion-bmi160#release-v1.1.1#$$ASSET_REPO$$/sensor-motion-bmi160/release-v1.1.1
mtb://sensor-motion-bmi160#latest-v1.X#$$ASSET_REPO$$/sensor-motion-bmi160/latest-v1.X
2 changes: 1 addition & 1 deletion deps/sensor-orientation-bmx160.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/Infineon/sensor-orientation-bmx160#latest-v1.X#$$ASSET_REPO$$/sensor-orientation-bmx160/latest-v1.X
mtb://sensor-orientation-bmx160#latest-v1.X#$$ASSET_REPO$$/sensor-orientation-bmx160/latest-v1.X
13 changes: 3 additions & 10 deletions source/audio_rec.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,8 @@ void pdm_pcm_isr_handler(void *arg, cyhal_pdm_pcm_event_t event);
*******************************************************************************/
cy_rslt_t pdm_pcm_clock_init(void) {
cy_rslt_t result;
result = cyhal_clock_get(&pll_clock, &CYHAL_CLOCK_PLL[1]);

if (result == CY_RSLT_SUCCESS) {
result = cyhal_clock_init(&pll_clock);
}
result = cyhal_clock_reserve(&pll_clock, &CYHAL_CLOCK_PLL[1]);

if (result == CY_RSLT_SUCCESS) {
result = cyhal_clock_set_frequency(&pll_clock, AUDIO_SYS_CLOCK_HZ, NULL);
Expand All @@ -146,11 +143,7 @@ cy_rslt_t pdm_pcm_clock_init(void) {
}

if (result == CY_RSLT_SUCCESS) {
result = cyhal_clock_get(&audio_clock, &CYHAL_CLOCK_HF[1]);
}

if (result == CY_RSLT_SUCCESS) {
result = cyhal_clock_init(&audio_clock);
result = cyhal_clock_reserve(&audio_clock, &CYHAL_CLOCK_HF[1]);
}

if (result == CY_RSLT_SUCCESS) {
Expand Down Expand Up @@ -413,7 +406,7 @@ void audio_task(void *arg)
{
(void)arg;
volatile uint32_t transmit_flag = 0;
uint32_t read_len = 0;
size_t read_len = 0;

print_audio_config_json();
cy_rtos_delay_milliseconds(500);
Expand Down
2 changes: 1 addition & 1 deletion source/sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void sensor_task(void *arg)
{
(void)arg;
volatile uint32_t transmit_flag = 0;
uint32_t read_len = 0;
size_t read_len = 0;

print_sensor_config_json();
cy_rtos_delay_milliseconds(1000);
Expand Down

0 comments on commit 81a76b1

Please sign in to comment.