Skip to content

Commit

Permalink
Update to version 1.2.1
Browse files Browse the repository at this point in the history
Updates in this Release:
- SERVICES lib update to version 1.97.0
  • Loading branch information
KimmoVaisanen-AlifSemi committed Jul 3, 2024
1 parent 633bbb1 commit 2f5f576
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 26 deletions.
22 changes: 8 additions & 14 deletions AlifSemiconductor.Ensemble.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
-->

<releases>
<release version="1.2.1" tag="v1.2.1" url="https://github.com/alifsemi/alif_ensemble-cmsis-dfp/releases/download/v1.2.1/AlifSemiconductor.Ensemble.1.2.1.pack" date="2024-06-27">
- update SE services to 1.97.0
</release>
<release version="1.2.0" tag="v1.2.0" url="https://github.com/alifsemi/alif_ensemble-cmsis-dfp/releases/download/v1.2.0/AlifSemiconductor.Ensemble.1.2.0.pack" date="2024-06-19">
- CANFD Blocking mode support
- FreeRTOS test apps for DMA, I2S, ADC
Expand Down Expand Up @@ -857,15 +860,6 @@
<require Cclass="Device" Cgroup="SOC Peripherals" Csub="GPIO"/>
<require Cclass="Device" Cgroup="SOC Peripherals" Csub="MIPI CSI2"/>
</condition>
<condition id="WE310F5 WIFI Driver">
<description>Requirement for WE310F5 Wifi Driver</description>
<require condition="Ensemble"/>
<require Cclass="CMSIS" Cgroup="CORE"/>
<require Cclass="Device" Cgroup="Startup"/>
<require Cclass="Device" Cgroup="SOC Peripherals" Csub="PINCONF"/>
<require Cclass="Device" Cgroup="SOC Peripherals" Csub="SPI"/>
<require Cclass="Device" Cgroup="SOC Peripherals" Csub="GPIO"/>
</condition>
<condition id="SE SERVICES MHU">
<description>Requirement SE SERVICES MHU </description>
<require condition="Ensemble"/>
Expand Down Expand Up @@ -1034,7 +1028,7 @@
<file category="source" name="Boards/DevKit-e7/Templates/Common/Include/temperature.h" attr="template" select="TSENS FreeRTOS Demo"/>
<file category="source" name="Boards/DevKit-e7/Templates/FreeRTOS/i2s_testapp.c" attr="template" select="I2S FreeRTOS Demo"/>
<file category="header" name="Boards/DevKit-e7/Templates/FreeRTOS/i2s_samples.h" attr="template" select="I2S FreeRTOS Demo"/>

<!-- LWIP templates -->
<file category="source" name="Boards/DevKit-e7/Templates/lwip/httpd/fs.c" attr="template" select="LWIP httpd Demo"/>
<file category="source" name="Boards/DevKit-e7/Templates/lwip/httpd/httpd.c" attr="template" select="LWIP httpd Demo"/>
Expand Down Expand Up @@ -1416,7 +1410,7 @@
<file category="source" name="components/Source/HM0360_camera_sensor.c"/>
</files>
</component>

<component Cclass="BSP" Cgroup="External peripherals" Csub="CAMERA Sensor ARX3A0" Cversion="1.1.0" condition="Camera Sensor Driver">
<description>CAMERA Sensor Driver for ARX3A0</description>
<RTE_Components_h> <!-- the following content goes into file 'RTE_Components.h' -->
Expand Down Expand Up @@ -1769,7 +1763,7 @@
</files>
</component>

<component Cclass="Device" Cgroup="SOC Peripherals" Csub="MHU" Cversion="1.96.0" condition="SE SERVICES MHU">
<component Cclass="Device" Cgroup="SOC Peripherals" Csub="MHU" Cversion="1.97.0" condition="SE SERVICES MHU">
<description>Message Handling Unit driver for Alif Soc</description>
<files>
<file category="header" name="drivers/include/drivers_common.h"/>
Expand All @@ -1791,10 +1785,10 @@
</files>
</component> -->

<component Cclass="Device" Cgroup="SE runtime Services" Csub="core" Cvariant="Source" Cversion="1.96.0" condition="SE SERVICES SRC">
<component Cclass="Device" Cgroup="SE runtime Services" Csub="core" Cvariant="Source" Cversion="1.97.0" condition="SE SERVICES SRC">
<description>SE runtime Services for RTSS cores</description>
<files>
<file category="doc" name="se_services/document/SE_Host_Services_API_v1.96.0.pdf"/>
<file category="doc" name="se_services/document/SE_Host_Services_API_v1.97.0.pdf"/>
<file category="include" name="se_services/include/"/>
<file category="source" name="se_services/source/services_host_application.c"/>
<file category="source" name="se_services/source/services_host_boot.c"/>
Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion se_services/include/services_lib_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ typedef struct {
} net_proc_boot_args_t;

typedef enum {
POWER_SETTING_BOR_EN
POWER_SETTING_BOR_EN,
POWER_SETTING_SCALED_CLK_FREQ
} power_setting_t;

/*******************************************************************************
Expand Down
9 changes: 1 addition & 8 deletions se_services/include/services_lib_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extern "C" {
/**
* Version JIRA Description
* 0.49.0 Deprecating SERVICES_system_get_toc_via_name
* 0.49.1 Updated examples for ALIF Update Package support.
* 0.48.0 Switch to external CMSIS source builds
* 0.0.47 Add Power setting Get/Configure API
* 0.0.46 Adding UPDATE STOC Service and test
Expand Down Expand Up @@ -152,10 +153,6 @@ typedef struct {
volatile uint32_t send_ip_clock_gating;
volatile uint32_t send_phy_pwr_gating;
volatile uint32_t send_vdd_ioflex_3V3;
volatile uint32_t send_wakeup_events;
volatile uint32_t send_ewic_cfg;
volatile uint32_t send_vtor_address;
volatile uint32_t send_vtor_address_ns;
volatile int resp_error_code;
} aipm_set_run_profile_svc_t;

Expand All @@ -172,10 +169,6 @@ typedef struct {
volatile uint32_t resp_ip_clock_gating;
volatile uint32_t resp_phy_pwr_gating;
volatile uint32_t resp_vdd_ioflex_3V3;
volatile uint32_t resp_wakeup_events;
volatile uint32_t resp_ewic_cfg;
volatile uint32_t resp_vtor_address;
volatile uint32_t resp_vtor_address_ns;
volatile int resp_error_code;
} aipm_get_run_profile_svc_t;

Expand Down
40 changes: 37 additions & 3 deletions se_services/source/services_host_clocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
* G L O B A L V A R I A B L E S
******************************************************************************/

static uint32_t s_se_scaled_frequency[SCALED_FREQ_NONE] =
{76800000, 38400000, 19200000, 9600000, 4800000, 2400000, 1200000, 600000, // 1/X
76800000, 38400000, 19200000, 4800000, 1200000, 600000, 300000, 75000, // 1/Y
38400000, 19200000, 9600000, 4800000, 2400000, 1200000, 600000, 300000, // 1/Z low
38400000, 19200000, 9600000, 2400000, 600000, 300000, 150000, 37500}; // 1/Z high

/*******************************************************************************
* C O D E
******************************************************************************/
Expand Down Expand Up @@ -515,11 +521,13 @@ uint32_t SERVICES_pll_clkpll_is_locked(uint32_t services_handle,
* @brief Get the values of the clocks registers
* @param services_handle
* @param pp_svc Service struct definition
* @param scaled_clk_freq Scaled clock frequency
* @param error_code Service error code
* @return Transport layer error code
*/
uint32_t SERVICES_clocks_get_clocks(uint32_t services_handle,
clk_get_clocks_svc_t ** pp_svc,
scaled_clk_freq_t * scaled_clk_freq,
uint32_t * error_code)
{
*pp_svc = (clk_get_clocks_svc_t *)
Expand All @@ -529,7 +537,22 @@ uint32_t SERVICES_clocks_get_clocks(uint32_t services_handle,
SERVICE_CLOCK_GET_CLOCKS, DEFAULT_TIMEOUT);

*error_code = (*pp_svc)->resp_error_code;
return ret;
if (ret != SERVICES_REQ_SUCCESS)
{
return ret;
}

// Get the scaled clock frequency
power_setting_svc_t * p_svc =
(power_setting_svc_t *)
SERVICES_prepare_packet_buffer(sizeof(power_setting_svc_t));

p_svc->send_setting_type = POWER_SETTING_SCALED_CLK_FREQ;
SERVICES_send_request(services_handle,
SERVICE_POWER_SETTING_GET_REQ_ID, DEFAULT_TIMEOUT);
*scaled_clk_freq = p_svc->value;

return SERVICES_REQ_SUCCESS;
}

/**
Expand All @@ -547,8 +570,9 @@ uint32_t SERVICES_clocks_get_apb_frequency(uint32_t services_handle,
uint32_t * error_code)
{
clk_get_clocks_svc_t * p_clocks;
scaled_clk_freq_t scaled_freq;
uint32_t ret =
SERVICES_clocks_get_clocks(services_handle, &p_clocks, error_code);
SERVICES_clocks_get_clocks(services_handle, &p_clocks, &scaled_freq, error_code);

if (ret != SERVICES_REQ_SUCCESS)
{
Expand All @@ -559,6 +583,10 @@ uint32_t SERVICES_clocks_get_apb_frequency(uint32_t services_handle,

uint32_t osc_freq = (p_clocks->cgu_osc_ctrl & BIT0) > 0 ?
FREQ_38_4_MHz : FREQ_76_8_MHz;
if (scaled_freq < SCALED_FREQ_NONE)
{
osc_freq = s_se_scaled_frequency[scaled_freq];
}

uint32_t calc_freq = 0;
a32_source_t aclk = p_clocks->aclk_ctrl & (BIT1 | BIT0);
Expand Down Expand Up @@ -613,8 +641,9 @@ uint32_t SERVICES_clocks_get_refclk_frequency(uint32_t services_handle,
uint32_t * error_code)
{
clk_get_clocks_svc_t * p_clocks;
scaled_clk_freq_t scaled_freq;
uint32_t ret =
SERVICES_clocks_get_clocks(services_handle, &p_clocks, error_code);
SERVICES_clocks_get_clocks(services_handle, &p_clocks, &scaled_freq, error_code);

if (ret != SERVICES_REQ_SUCCESS)
{
Expand All @@ -623,6 +652,11 @@ uint32_t SERVICES_clocks_get_refclk_frequency(uint32_t services_handle,

uint32_t osc_freq = (p_clocks->cgu_osc_ctrl & BIT0) > 0 ?
FREQ_38_4_MHz : FREQ_76_8_MHz;
if (scaled_freq < SCALED_FREQ_NONE)
{
osc_freq = s_se_scaled_frequency[scaled_freq];
}

uint32_t refclk_freq = (p_clocks->cgu_pll_sel & BIT0) > 0 ?
FREQ_100_MHz : osc_freq;

Expand Down

0 comments on commit 2f5f576

Please sign in to comment.